Skip to content

Commit

Permalink
Fix: Close #2803
Browse files Browse the repository at this point in the history
  • Loading branch information
BornToBeRoot committed Jul 31, 2024
1 parent 3612e7a commit 1ab5d61
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Source/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("2024.5.12.0")]
[assembly: AssemblyFileVersion("2024.5.12.0")]
[assembly: AssemblyVersion("2024.8.1.0")]
[assembly: AssemblyFileVersion("2024.8.1.0")]
4 changes: 2 additions & 2 deletions Source/NETworkManager.Profiles/ProfileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ public static void Save()
// Only if the password provided earlier was valid...
if (LoadedProfileFile.IsPasswordValid)
{
var decryptedBytes = SerializeToByteArray(new List<GroupInfo>(Groups));
var decryptedBytes = SerializeToByteArray([..Groups]);
var encryptedBytes = CryptoHelper.Encrypt(decryptedBytes,
SecureStringHelper.ConvertToString(LoadedProfileFile.Password),
GlobalStaticConfiguration.Profile_EncryptionKeySize,
Expand All @@ -493,7 +493,7 @@ public static void Save()
}
else
{
SerializeToFile(LoadedProfileFile.Path, new List<GroupInfo>(Groups));
SerializeToFile(LoadedProfileFile.Path, [..Groups]);
}

ProfilesChanged = false;
Expand Down
5 changes: 5 additions & 0 deletions Source/NETworkManager.Settings/SettingsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using System.Xml.Serialization;
using log4net;
using NETworkManager.Controls;
using NETworkManager.Models;
using NETworkManager.Models.Network;
using NETworkManager.Models.PowerShell;
Expand Down Expand Up @@ -333,6 +334,10 @@ private static void UpgradeTo_2023_11_28_0()
private static void UpgradeToLatest(Version version)
{
Log.Info($"Apply upgrade to {version}...");

Log.Info("Reset ApplicationList to default...");
Current.General_ApplicationList =
new ObservableSetCollection<ApplicationInfo>(ApplicationManager.GetDefaultList());
}

#endregion
Expand Down
10 changes: 5 additions & 5 deletions Source/NETworkManager/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@ private void LoadApplicationList()

// Select the application
// Set application via command line, or select the default one, fallback to the first visible one
var applicationList = Applications.Cast<ApplicationInfo>();

var applicationList = Applications.Cast<ApplicationInfo>().ToArray();
if (CommandLineManager.Current.Application != ApplicationName.None)
SelectedApplication = applicationList.FirstOrDefault(x => x.Name == CommandLineManager.Current.Application);
else
Expand Down Expand Up @@ -1259,7 +1259,7 @@ private void RunCommandDoAction()

private void RunCommandCloseAction()
{
RunCommandFlyoutClose();
RunCommandFlyoutClose().ConfigureAwait(false);
}

#endregion
Expand Down Expand Up @@ -1321,7 +1321,7 @@ private void RunCommandDo()
}

// Close the flyout
RunCommandFlyoutClose(true);
RunCommandFlyoutClose(true).ConfigureAwait(false);
}

/// <summary>
Expand Down Expand Up @@ -1360,7 +1360,7 @@ private void FlyoutRunCommand_IsKeyboardFocusWithinChanged(object sender, Depend
if (e.NewValue is not false)
return;

RunCommandFlyoutClose();
RunCommandFlyoutClose().ConfigureAwait(false);
}

#endregion
Expand Down

0 comments on commit 1ab5d61

Please sign in to comment.