Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit becf46d

Browse files
committedApr 9, 2025·
Update BaseRotateAction.cs
1 parent b7cbc46 commit becf46d

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed
 

‎src/Files.App/Actions/Content/ImageManipulation/BaseRotateAction.cs

+4-9
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ internal abstract class BaseRotateAction : ObservableObject, IAction
2222

2323
public bool IsExecutable =>
2424
context.ShellPage is not null &&
25+
context.ShellPage.SlimContentPage is not null &&
2526
context.PageType != ContentPageTypes.RecycleBin &&
2627
context.PageType != ContentPageTypes.ZipFolder &&
2728
context.PageType != ContentPageTypes.ReleaseNotes &&
@@ -48,14 +49,8 @@ public async Task ExecuteAsync(object? parameter = null)
4849

4950
private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)
5051
{
51-
switch (e.PropertyName)
52-
{
53-
case nameof(IContentPageContext.SelectedItems):
54-
{
55-
OnPropertyChanged(nameof(IsExecutable));
56-
break;
57-
}
58-
}
52+
if (e.PropertyName is nameof(IContentPageContext.SelectedItems))
53+
OnPropertyChanged(nameof(IsExecutable));
5954
}
6055
}
61-
}
56+
}

0 commit comments

Comments
 (0)
Please sign in to comment.