Skip to content

Commit b7d2f18

Browse files
authored
Fix: Fixed NullReferenceException in InvertSelectionAction (#14681)
1 parent 34e6fb7 commit b7d2f18

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/Files.App/Actions/Content/Selection/InvertSelectionAction.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Files.App.Actions
55
{
6-
internal class InvertSelectionAction : ObservableObject, IAction
6+
internal class InvertSelectionAction : IAction
77
{
88
private readonly IContentPageContext context;
99

@@ -41,8 +41,6 @@ public bool IsExecutable
4141
public InvertSelectionAction()
4242
{
4343
context = Ioc.Default.GetRequiredService<IContentPageContext>();
44-
45-
context.PropertyChanged += Context_PropertyChanged;
4644
}
4745

4846
public Task ExecuteAsync()
@@ -51,17 +49,5 @@ public Task ExecuteAsync()
5149

5250
return Task.CompletedTask;
5351
}
54-
55-
private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)
56-
{
57-
switch (e.PropertyName)
58-
{
59-
case nameof(IContentPageContext.PageType):
60-
case nameof(IContentPageContext.HasItem):
61-
case nameof(IContentPageContext.ShellPage):
62-
OnPropertyChanged(nameof(IsExecutable));
63-
break;
64-
}
65-
}
6652
}
6753
}

0 commit comments

Comments
 (0)