diff --git a/src/UniGetUI.Avalonia/ViewModels/DialogPages/InstallOptionsViewModel.cs b/src/UniGetUI.Avalonia/ViewModels/DialogPages/InstallOptionsViewModel.cs index f8b5a6c33e..51b86141f2 100644 --- a/src/UniGetUI.Avalonia/ViewModels/DialogPages/InstallOptionsViewModel.cs +++ b/src/UniGetUI.Avalonia/ViewModels/DialogPages/InstallOptionsViewModel.cs @@ -301,8 +301,8 @@ public InstallOptionsViewModel(IPackage package, OperationType operation, Instal string globalName = CoreTools.Translate(CommonTranslations.ScopeNames[PackageScope.Global]); ScopeOptions.Add(localName); ScopeOptions.Add(globalName); - if (options.InstallationScope == "Local") SelectedScope = localName; - if (options.InstallationScope == "Global") SelectedScope = globalName; + if (options.InstallationScope == PackageScope.Local) SelectedScope = localName; + if (options.InstallationScope == PackageScope.Global) SelectedScope = globalName; } ScopeEnabled = caps.SupportsCustomScopes; @@ -575,8 +575,8 @@ private void ApplyToOptions() private static string ScopeToString(string? selected) { - if (selected == CoreTools.Translate(CommonTranslations.ScopeNames[PackageScope.Local])) return "Local"; - if (selected == CoreTools.Translate(CommonTranslations.ScopeNames[PackageScope.Global])) return "Global"; + if (selected == CoreTools.Translate(CommonTranslations.ScopeNames[PackageScope.Local])) return PackageScope.Local; + if (selected == CoreTools.Translate(CommonTranslations.ScopeNames[PackageScope.Global])) return PackageScope.Global; return ""; }