From 22ecbbd845cd50a8463c073fcdbb5722472f04c0 Mon Sep 17 00:00:00 2001 From: GabrielDuf Date: Wed, 15 Jul 2026 08:23:44 -0400 Subject: [PATCH] Fix installation scope not being respected (#5098) --- .../ViewModels/DialogPages/InstallOptionsViewModel.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ""; }