Fix delete key executing twice on mail list.

This commit is contained in:
Burak Kaan Köse
2024-11-27 20:43:49 +01:00
parent 9abe3dd7b3
commit 36b8de470a
3 changed files with 13 additions and 12 deletions

View File

@@ -62,6 +62,10 @@ namespace Wino.Views
{
base.OnNavigatedFrom(e);
// Dispose all WinoListView items.
MailListView.Dispose();
this.Bindings.StopTracking();
RenderingFrame.Navigate(typeof(IdlePage));
@@ -347,16 +351,6 @@ namespace Wino.Views
SearchBar.PlaceholderText = Translator.SearchBarPlaceholder;
}
private void ProcessMailItemKeyboardAccelerator(UIElement sender, ProcessKeyboardAcceleratorEventArgs args)
{
if (args.Key == Windows.System.VirtualKey.Delete)
{
args.Handled = true;
ViewModel?.ExecuteMailOperationCommand?.Execute(MailOperation.SoftDelete);
}
}
/// <summary>
/// Thread header is mail info display control and it can be dragged spearately out of ListView.
/// We need to prepare a drag package for it from the items inside.