File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/Files.App/Actions/Show Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 33
44namespace Files . App . Actions
55{
6- internal sealed class ToggleSidebarAction : ObservableObject , IToggleAction
6+ internal sealed class ToggleSidebarAction : IToggleAction
77 {
8- // private readonly IAppearanceSettingsService AppearanceSettingsService = Ioc.Default.GetRequiredService<IAppearanceSettingsService>();
8+ private IAppearanceSettingsService AppearanceSettingsService { get ; } = Ioc . Default . GetRequiredService < IAppearanceSettingsService > ( ) ;
99
1010 public string Label
1111 => "ToggleSidebar" . GetLocalizedResource ( ) ;
@@ -26,9 +26,8 @@ public ToggleSidebarAction()
2626
2727 public Task ExecuteAsync ( object ? parameter = null )
2828 {
29- // AppearanceSettingsService.IsSidebarOpen = !IsOn;
30- Files . App . ViewModels . UserControls . IsSidebarOpen . set ( ! IsOn ) ;
31- // Let's try this with as few abstractions as possible.
29+ AppearanceSettingsService . IsSidebarOpen = ! IsOn ;
30+
3231 return Task . CompletedTask ;
3332 }
3433
You can’t perform that action at this time.
0 commit comments