fix issue with adding new key when no keys are present
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors></Authors>
|
<Authors></Authors>
|
||||||
<Company></Company>
|
<Company></Company>
|
||||||
<Version>0.8.21</Version>
|
<Version>0.8.22</Version>
|
||||||
<Description></Description>
|
<Description></Description>
|
||||||
<Copyright></Copyright>
|
<Copyright></Copyright>
|
||||||
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
||||||
|
|||||||
@@ -852,7 +852,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Plus, "Add new Secret Key"))
|
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",
|
FriendlyName = "New Secret Key",
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user