Skip to content

Commit c9ab381

Browse files
committed
Fix errors
1 parent 898bcb0 commit c9ab381

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

YMouseButtonControl.Core/ViewModels/MainWindow/GlobalSettingsDialogViewModel.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ IThemeService themeService
5959
x => x.LoggingEnabled,
6060
selector: val => val != enableLoggingService.GetLoggingState()
6161
);
62-
var startMenuChanged = this.WhenAnyValue(x => x.StartMenuChecked,
63-
selector: val => val != startMenuInstallerService.InstallStatus());
62+
var startMenuChanged = this.WhenAnyValue(
63+
x => x.StartMenuChecked,
64+
selector: val => StartMenuEnabled && val != startMenuInstallerService.InstallStatus()
65+
);
6466
var themeChanged = this.WhenAnyValue(
6567
x => x.ThemeSetting.IntValue,
6668
selector: val =>
@@ -88,7 +90,10 @@ IThemeService themeService
8890
}
8991
}
9092

91-
if (StartMenuChecked != startMenuInstallerService.InstallStatus())
93+
if (
94+
StartMenuEnabled
95+
&& StartMenuChecked != startMenuInstallerService.InstallStatus()
96+
)
9297
{
9398
if (StartMenuChecked)
9499
{
@@ -117,7 +122,7 @@ public bool StartMenuChecked
117122
get => _startMenuChecked;
118123
set => this.RaiseAndSetIfChanged(ref _startMenuChecked, value);
119124
}
120-
125+
121126
public bool StartMenuEnabled { get; init; }
122127

123128
public SettingBoolVm StartMinimized
@@ -151,4 +156,4 @@ public ObservableCollection<ThemeVm> ThemeCollection
151156
}
152157

153158
public ReactiveCommand<Unit, Unit> ApplyCommand { get; init; }
154-
}
159+
}

0 commit comments

Comments
 (0)