Skip to content

Commit b02f2bc

Browse files
author
Gness Erquint
committed
Revert that hack attempt accidentally pointing at a static method. Need to find the instance reference.
1 parent 10bfad6 commit b02f2bc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 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 : 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

0 commit comments

Comments
 (0)