Skip to content

Commit

Permalink
fix(preferences(js)): review order of mail filter actions
Browse files Browse the repository at this point in the history
Fixes #5325
  • Loading branch information
cgx committed Oct 7, 2021
1 parent 710fd2f commit 138ee06
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UI/Templates/PreferencesUI/UIxFilterEditor.wox
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

<md-input-container class="md-block md-flex">
<md-select ng-model="action.method">
<md-option ng-value="key" ng-repeat="(key, value) in filterEditor.methodLabels">{{ value }}</md-option>
<md-option ng-value="key" ng-repeat="key in filterEditor.methods">{{ filterEditor.methodLabels[key] }}</md-option>
</md-select>
</md-input-container>

Expand Down
13 changes: 12 additions & 1 deletion UI/WebServerResources/js/Preferences/FiltersDialogController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 138ee06

Please sign in to comment.