Improved keyboad shortcuts.
This commit is contained in:
@@ -52,7 +52,6 @@ public sealed partial class MailListPage : MailListPageAbstract,
|
||||
|
||||
private IStatePersistanceService StatePersistenceService { get; } = WinoApplication.Current.Services.GetService<IStatePersistanceService>() ?? throw new Exception($"Can't resolve {nameof(KeyPressService)}");
|
||||
private IKeyPressService KeyPressService { get; } = WinoApplication.Current.Services.GetService<IKeyPressService>() ?? throw new Exception($"Can't resolve {nameof(KeyPressService)}");
|
||||
private IKeyboardShortcutService KeyboardShortcutService { get; } = WinoApplication.Current.Services.GetService<IKeyboardShortcutService>() ?? throw new Exception($"Can't resolve {nameof(IKeyboardShortcutService)}");
|
||||
public MailListPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -671,19 +670,7 @@ public sealed partial class MailListPage : MailListPageAbstract,
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check keyboard shortcuts from service.
|
||||
ModifierKeys modifiers = args.Modifiers.ToDomainModifierKeys();
|
||||
|
||||
var operation = await KeyboardShortcutService.GetMailOperationForKeyAsync(args.Key.ToString(), modifiers);
|
||||
|
||||
if (operation != null)
|
||||
{
|
||||
ViewModel.ExecuteMailOperationCommand.Execute(operation);
|
||||
}
|
||||
else
|
||||
{
|
||||
args.Handled = false;
|
||||
}
|
||||
args.Handled = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user