mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 20:27:22 +01:00
fix issue with adding new key when no keys are present
This commit is contained in:
parent
f721fb0b09
commit
6b5500c905
2 changed files with 2 additions and 2 deletions
|
|
@ -852,7 +852,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||
ImGui.Separator();
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Plus, "Add new Secret Key"))
|
||||
{
|
||||
selectedServer.SecretKeys.Add(selectedServer.SecretKeys.Max(p => p.Key) + 1, new SecretKey()
|
||||
selectedServer.SecretKeys.Add(selectedServer.SecretKeys.Any() ? selectedServer.SecretKeys.Max(p => p.Key) + 1 : 0, new SecretKey()
|
||||
{
|
||||
FriendlyName = "New Secret Key",
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue