mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
[Settings]Fix ColorPicker dashboard shortcut (#37547)
* Fix color picker dashboard shortcut * remove not needed code * Remove comment
This commit is contained in:
@@ -31,7 +31,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
ViewModel = new ColorPickerViewModel(
|
||||
settingsUtils,
|
||||
SettingsRepository<GeneralSettings>.GetInstance(settingsUtils),
|
||||
null,
|
||||
SettingsRepository<ColorPickerSettings>.GetInstance(settingsUtils),
|
||||
ShellPage.SendDefaultIPCMessage);
|
||||
DataContext = ViewModel;
|
||||
InitializeComponent();
|
||||
|
||||
@@ -57,15 +57,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
_settingsUtils = settingsUtils ?? throw new ArgumentNullException(nameof(settingsUtils));
|
||||
|
||||
if (colorPickerSettingsRepository == null)
|
||||
{
|
||||
// used in release. This method converts the settings stored in the previous form, so we have forwards compatibility
|
||||
_colorPickerSettings = _settingsUtils.GetSettingsOrDefault<ColorPickerSettings, ColorPickerSettingsVersion1>(ColorPickerSettings.ModuleName, settingsUpgrader: ColorPickerSettings.UpgradeSettings);
|
||||
}
|
||||
else
|
||||
{
|
||||
_colorPickerSettings = colorPickerSettingsRepository.SettingsConfig; // used in the unit tests
|
||||
}
|
||||
_colorPickerSettings = colorPickerSettingsRepository.SettingsConfig;
|
||||
|
||||
InitializeEnabledValue();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user