From 138ee065a24cc65f5d3db1c6e2e93500f33acd92 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 7 Oct 2021 12:57:17 -0400 Subject: [PATCH] fix(preferences(js)): review order of mail filter actions Fixes #5325 --- UI/Templates/PreferencesUI/UIxFilterEditor.wox | 2 +- .../js/Preferences/FiltersDialogController.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/UI/Templates/PreferencesUI/UIxFilterEditor.wox b/UI/Templates/PreferencesUI/UIxFilterEditor.wox index 604490733..eb93a8e1e 100644 --- a/UI/Templates/PreferencesUI/UIxFilterEditor.wox +++ b/UI/Templates/PreferencesUI/UIxFilterEditor.wox @@ -120,7 +120,7 @@ - {{ value }} + {{ filterEditor.methodLabels[key] }} diff --git a/UI/WebServerResources/js/Preferences/FiltersDialogController.js b/UI/WebServerResources/js/Preferences/FiltersDialogController.js index fa7121eda..5d3003570 100644 --- a/UI/WebServerResources/js/Preferences/FiltersDialogController.js +++ b/UI/WebServerResources/js/Preferences/FiltersDialogController.js @@ -52,6 +52,17 @@ if (sieveCapabilities.indexOf("imapflags") > -1 || sieveCapabilities.indexOf("imap4flags") > -1) this.methodLabels.addflag = l("Flag the message with"); + this.methods = [ + "fileinto", + "addflag", + "stop", + "keep", + "discard", + "redirect", + "reject" + ]; + this.methods = _.intersection(this.methods, _.keys(this.methodLabels)); + this.numberOperatorLabels = { "under": l("is under"), "over": l("is over") @@ -120,7 +131,7 @@ if (!this.filter.actions) this.filter.actions = []; - this.filter.actions.push({ method: 'discard' }); + this.filter.actions.push({ method: 'fileinto' }); }; this.removeMailFilterAction = function (index) {