Skip to content

Commit 10bfad6

Browse files
author
Gness Erquint
committed
Gonna try referencing a method directly.
1 parent 2450492 commit 10bfad6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Files.App/Actions/Show/ToggleSidebarAction.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
namespace 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

0 commit comments

Comments
 (0)