mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-30 07:46:27 +00:00
Keyboard shortcuts improvements (#70)
This commit is contained in:
@@ -415,8 +415,8 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
|
||||
});
|
||||
|
||||
// reply
|
||||
key('r', Enums.KeyState.MessageView, function () {
|
||||
if (oData.useKeyboardShortcuts())
|
||||
key('r', [Enums.KeyState.MessageList, Enums.KeyState.MessageView], function () {
|
||||
if (oData.useKeyboardShortcuts() && oData.message())
|
||||
{
|
||||
self.replyCommand();
|
||||
return false;
|
||||
@@ -424,8 +424,8 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
|
||||
});
|
||||
|
||||
// replaAll
|
||||
key('a', Enums.KeyState.MessageView, function () {
|
||||
if (oData.useKeyboardShortcuts())
|
||||
key('a', [Enums.KeyState.MessageList, Enums.KeyState.MessageView], function () {
|
||||
if (oData.useKeyboardShortcuts() && oData.message())
|
||||
{
|
||||
self.replyAllCommand();
|
||||
return false;
|
||||
@@ -433,8 +433,8 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
|
||||
});
|
||||
|
||||
// forward
|
||||
key('f', Enums.KeyState.MessageView, function () {
|
||||
if (oData.useKeyboardShortcuts())
|
||||
key('f', [Enums.KeyState.MessageList, Enums.KeyState.MessageView], function () {
|
||||
if (oData.useKeyboardShortcuts() && oData.message())
|
||||
{
|
||||
self.forwardCommand();
|
||||
return false;
|
||||
@@ -442,7 +442,7 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
|
||||
});
|
||||
|
||||
// message information
|
||||
key('i', Enums.KeyState.MessageView, function () {
|
||||
key('i', [Enums.KeyState.MessageList, Enums.KeyState.MessageView], function () {
|
||||
if (oData.useKeyboardShortcuts())
|
||||
{
|
||||
self.showFullInfo(!self.showFullInfo());
|
||||
@@ -451,7 +451,7 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
|
||||
});
|
||||
|
||||
// toggle message blockquotes
|
||||
key('b', Enums.KeyState.MessageView, function () {
|
||||
key('b', [Enums.KeyState.MessageList, Enums.KeyState.MessageView], function () {
|
||||
if (oData.useKeyboardShortcuts() && oData.message() && oData.message().body)
|
||||
{
|
||||
Utils.toggleMessageBlockquote(oData.message().body);
|
||||
@@ -488,15 +488,6 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
|
||||
}
|
||||
});
|
||||
|
||||
// archive
|
||||
// key('delete', Enums.KeyState.MessageView, function () {
|
||||
// if (oData.useKeyboardShortcuts())
|
||||
// {
|
||||
// self.archiveCommand();
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
|
||||
// delete
|
||||
key('delete, shift+delete', Enums.KeyState.MessageView, function (event, handler) {
|
||||
if (oData.useKeyboardShortcuts() && event)
|
||||
|
||||
Reference in New Issue
Block a user