Skip to content

Commit

Permalink
[Settings]Fix ColorPicker dashboard shortcut (#37547)
Browse files Browse the repository at this point in the history
* Fix color picker dashboard shortcut

* remove not needed code

* Remove comment
  • Loading branch information
mantaionut authored Feb 24, 2025
1 parent f237091 commit 744316c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public ColorPickerPage()
ViewModel = new ColorPickerViewModel(
settingsUtils,
SettingsRepository<GeneralSettings>.GetInstance(settingsUtils),
null,
SettingsRepository<ColorPickerSettings>.GetInstance(settingsUtils),
ShellPage.SendDefaultIPCMessage);
DataContext = ViewModel;
InitializeComponent();
Expand Down
10 changes: 1 addition & 9 deletions src/settings-ui/Settings.UI/ViewModels/ColorPickerViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,7 @@ public ColorPickerViewModel(

_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();

Expand Down

0 comments on commit 744316c

Please sign in to comment.