diff --git a/dev/Common/Enums.js b/dev/Common/Enums.js index e69737d22..e261c40c5 100644 --- a/dev/Common/Enums.js +++ b/dev/Common/Enums.js @@ -11,7 +11,6 @@ export const Capa = { Search: 'SEARCH', SearchAdv: 'SEARCH_ADV', MessageActions: 'MESSAGE_ACTIONS', - MessageListActions: 'MESSAGELIST_ACTIONS', AttachmentsActions: 'ATTACHMENTS_ACTIONS', DangerousActions: 'DANGEROUS_ACTIONS', Settings: 'SETTINGS', diff --git a/dev/View/User/MailBox/MessageList.js b/dev/View/User/MailBox/MessageList.js index 67bdde223..9c3189d31 100644 --- a/dev/View/User/MailBox/MessageList.js +++ b/dev/View/User/MailBox/MessageList.js @@ -62,7 +62,6 @@ export class MessageListMailBoxUserView extends AbstractViewRight { this.allowReload = Settings.capa(Capa.Reload); this.allowSearch = Settings.capa(Capa.Search); this.allowSearchAdv = Settings.capa(Capa.SearchAdv); - this.allowMessageListActions = Settings.capa(Capa.MessageListActions); this.allowDangerousActions = Settings.capa(Capa.DangerousActions); this.messageList = MessageUserStore.list; @@ -754,24 +753,22 @@ export class MessageListMailBoxUserView extends AbstractViewRight { } }); - if (Settings.capa(Capa.MessageListActions)) { - // archive (zip) - shortcuts.add('z', '', [Scope.MessageList, Scope.MessageView], () => { - this.archiveCommand(); - return false; - }); + // archive (zip) + shortcuts.add('z', '', [Scope.MessageList, Scope.MessageView], () => { + this.archiveCommand(); + return false; + }); - // delete - shortcuts.add('delete', 'shift', Scope.MessageList, () => { - MessageUserStore.listCheckedOrSelected().length && this.deleteWithoutMoveCommand(); - return false; - }); -// shortcuts.add('3', 'shift', Scope.MessageList, () => { - shortcuts.add('delete', '', Scope.MessageList, () => { - MessageUserStore.listCheckedOrSelected().length && this.deleteCommand(); - return false; - }); - } + // delete + shortcuts.add('delete', 'shift', Scope.MessageList, () => { + MessageUserStore.listCheckedOrSelected().length && this.deleteWithoutMoveCommand(); + return false; + }); +// shortcuts.add('3', 'shift', Scope.MessageList, () => { + shortcuts.add('delete', '', Scope.MessageList, () => { + MessageUserStore.listCheckedOrSelected().length && this.deleteCommand(); + return false; + }); if (Settings.capa(Capa.Reload)) { // check mail @@ -793,13 +790,11 @@ export class MessageListMailBoxUserView extends AbstractViewRight { return false; }); - if (Settings.capa(Capa.MessageListActions)) { - // important - star/flag messages - shortcuts.add('i', '', [Scope.MessageList, Scope.MessageView], () => { - this.flagMessagesFast(); - return false; - }); - } + // important - star/flag messages + shortcuts.add('i', '', [Scope.MessageList, Scope.MessageView], () => { + this.flagMessagesFast(); + return false; + }); shortcuts.add('t', '', [Scope.MessageList], () => { let message = MessageUserStore.selectorMessageSelected(); @@ -814,32 +809,28 @@ export class MessageListMailBoxUserView extends AbstractViewRight { return false; }); - if (Settings.capa(Capa.MessageListActions)) { - // move - shortcuts.add('insert', '', Scope.MessageList, () => { - if (this.newMoveToFolder) { - this.moveNewCommand(); - } else { - this.moveDropdownTrigger(true); - } + // move + shortcuts.add('insert', '', Scope.MessageList, () => { + if (this.newMoveToFolder) { + this.moveNewCommand(); + } else { + this.moveDropdownTrigger(true); + } - return false; - }); - } + return false; + }); - if (Settings.capa(Capa.MessageListActions)) { - // read - shortcuts.add('q', '', [Scope.MessageList, Scope.MessageView], () => { - this.seenMessagesFast(true); - return false; - }); + // read + shortcuts.add('q', '', [Scope.MessageList, Scope.MessageView], () => { + this.seenMessagesFast(true); + return false; + }); - // unread - shortcuts.add('u', '', [Scope.MessageList, Scope.MessageView], () => { - this.seenMessagesFast(false); - return false; - }); - } + // unread + shortcuts.add('u', '', [Scope.MessageList, Scope.MessageView], () => { + this.seenMessagesFast(false); + return false; + }); shortcuts.add('f,mailforward', 'shift', [Scope.MessageList, Scope.MessageView], () => { this.multyForwardCommand(); diff --git a/dev/View/User/MailBox/MessageView.js b/dev/View/User/MailBox/MessageView.js index cce7a67d0..431d6988b 100644 --- a/dev/View/User/MailBox/MessageView.js +++ b/dev/View/User/MailBox/MessageView.js @@ -54,7 +54,7 @@ class MessageViewMailBoxUserView extends AbstractViewRight { createCommandActionHelper = (folderType, useFolder) => createCommand(() => { const message = MessageUserStore.message(); - if (message && this.allowMessageListActions) { + if (message) { MessageUserStore.message(null); rl.app.deleteMessagesFromFolder(folderType, message.folder, [message.uid], useFolder); } @@ -74,7 +74,6 @@ class MessageViewMailBoxUserView extends AbstractViewRight { this.moveAction = moveAction; this.allowMessageActions = Settings.capa(Capa.MessageActions); - this.allowMessageListActions = Settings.capa(Capa.MessageListActions); const attachmentsActions = Settings.app('attachmentsActions'); this.attachmentsActions = ko.observableArray(arrayLength(attachmentsActions) ? attachmentsActions : []); diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php index 00b0182d2..a8d6fd05e 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -1905,12 +1905,8 @@ class Actions $aResult = array(); - if ($oConfig->Get('capa', 'messagelist_actions', true)) { - $aResult[] = Enumerations\Capa::MESSAGELIST_ACTIONS; - - if ($oConfig->Get('capa', 'dangerous_actions', true)) { - $aResult[] = Enumerations\Capa::DANGEROUS_ACTIONS; - } + if ($oConfig->Get('capa', 'dangerous_actions', true)) { + $aResult[] = Enumerations\Capa::DANGEROUS_ACTIONS; } if ($oConfig->Get('capa', 'reload', true)) { diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php index b6bb5e5be..6bb7b9e27 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Config/Application.php @@ -195,7 +195,6 @@ class Application extends \RainLoop\Config\AbstractConfig 'search_adv' => array(true), 'dangerous_actions' => array(true), 'message_actions' => array(true), - 'messagelist_actions' => array(true), 'attachments_actions' => array(true) ), diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php index 0dab192ab..5338cf6df 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Enumerations/Capa.php @@ -21,7 +21,6 @@ class Capa const HELP = 'HELP'; const TEMPLATES = 'TEMPLATES'; const MESSAGE_ACTIONS = 'MESSAGE_ACTIONS'; - const MESSAGELIST_ACTIONS = 'MESSAGELIST_ACTIONS'; const ATTACHMENTS_ACTIONS = 'ATTACHMENTS_ACTIONS'; const DANGEROUS_ACTIONS = 'DANGEROUS_ACTIONS'; const AUTOLOGOUT = 'AUTOLOGOUT';