|
|
@ -180,7 +180,14 @@ public partial class LaunchPageViewModel : PageViewModelBase, IDisposable, IAsyn |
|
|
|
|
|
|
|
|
|
|
|
public override void OnLoaded() |
|
|
|
public override void OnLoaded() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
// Load installed packages |
|
|
|
|
|
|
|
InstalledPackages = new ObservableCollection<InstalledPackage>( |
|
|
|
|
|
|
|
settingsManager.Settings.InstalledPackages |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Ensure active package either exists or is null |
|
|
|
// Ensure active package either exists or is null |
|
|
|
|
|
|
|
if (SelectedPackage?.Id is { } id && InstalledPackages.All(x => x.Id != id)) |
|
|
|
|
|
|
|
{ |
|
|
|
settingsManager.Transaction( |
|
|
|
settingsManager.Transaction( |
|
|
|
s => |
|
|
|
s => |
|
|
|
{ |
|
|
|
{ |
|
|
@ -188,11 +195,7 @@ public partial class LaunchPageViewModel : PageViewModelBase, IDisposable, IAsyn |
|
|
|
}, |
|
|
|
}, |
|
|
|
ignoreMissingLibraryDir: true |
|
|
|
ignoreMissingLibraryDir: true |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
// Load installed packages |
|
|
|
|
|
|
|
InstalledPackages = new ObservableCollection<InstalledPackage>( |
|
|
|
|
|
|
|
settingsManager.Settings.InstalledPackages |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Load active package |
|
|
|
// Load active package |
|
|
|
SelectedPackage = settingsManager.Settings.ActiveInstalledPackage; |
|
|
|
SelectedPackage = settingsManager.Settings.ActiveInstalledPackage; |
|
|
|