Skip to content

Fix: Fixed crash that would occur when clicking an item in the Tags widget #14745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Files.App/Data/Items/WidgetFileTagCardItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public WidgetFileTagCardItem(IStorable associatedStorable, Func<string, Task> op
_Path = associatedStorable.TryGetPath();
Item = this;

ClickCommand = new AsyncRelayCommand<CancellationToken>(ClickAsync);
ClickCommand = new AsyncRelayCommand(ClickAsync);
}

private Task ClickAsync(CancellationToken cancellationToken)
private Task ClickAsync()
{
return _openAction(_associatedStorable.Id);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/UserControls/Widgets/FileTagsWidget.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private void OpenInNewPane(WidgetCardItem? item)
});
}

private async void FileTagItem_ItemClick(object sender, ItemClickEventArgs e)
private void FileTagItem_ItemClick(object sender, ItemClickEventArgs e)
{
if (e.ClickedItem is WidgetFileTagCardItem itemViewModel)
itemViewModel.ClickCommand.Execute(null);
Expand Down