PushRules settings: Display keywords in alphabetical order

pull/641/head
manuroe 2016-01-14 11:15:59 +01:00
parent 0577edb055
commit 378f4bb85c
1 changed files with 4 additions and 4 deletions

View File

@ -59,9 +59,6 @@ module.exports = React.createClass({
};
},
keywordsDialogDiv: "",
newKeywords: undefined,
componentWillMount: function() {
this._refreshFromServer();
},
@ -170,7 +167,6 @@ module.exports = React.createClass({
onKeywordsClicked: function(event) {
var self = this;
this.newKeywords = undefined;
// Compute the keywords list to display
var keywords = [];
@ -179,6 +175,10 @@ module.exports = React.createClass({
keywords.push(rule.pattern);
}
if (keywords.length) {
// As keeping the order of per-word push rules hs side is a bit tricky to code,
// display the keywords in alphabetical order to the user
keywords.sort();
keywords = keywords.join(", ");
}
else {