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