Add ESC keyboard shortcut to close email detail view
Adds the ability to close the email detail/thread detail view by pressing the ESC key, following the same pattern used for closing the composer. Changes: - Add closeThreadDetail to MailViewActionShortcutType enum - Map ESC key to closeThreadDetail in AppShortcutManager - Handle closeThreadDetail action in HandleMailShortcutActionsExtension Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,8 @@ class AppShortcutManager {
|
||||
return MailViewActionShortcutType.newMessage;
|
||||
} else if (keysPressed.isOnly(LogicalKeyboardKey.keyU)) {
|
||||
return MailViewActionShortcutType.markAsUnread;
|
||||
} else if (keysPressed.isOnly(LogicalKeyboardKey.escape)) {
|
||||
return MailViewActionShortcutType.closeThreadDetail;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ enum MailViewActionShortcutType {
|
||||
forward,
|
||||
delete,
|
||||
newMessage,
|
||||
markAsUnread;
|
||||
markAsUnread,
|
||||
closeThreadDetail;
|
||||
|
||||
EmailActionType? getEmailActionType({
|
||||
required PresentationEmail currentEmail,
|
||||
@@ -34,6 +35,8 @@ enum MailViewActionShortcutType {
|
||||
return EmailActionType.compose;
|
||||
case MailViewActionShortcutType.markAsUnread:
|
||||
return EmailActionType.markAsUnread;
|
||||
case MailViewActionShortcutType.closeThreadDetail:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user