From 378f4bb85c41716dfbdebdba6a10fcfa5000152c Mon Sep 17 00:00:00 2001 From: manuroe Date: Thu, 14 Jan 2016 11:15:59 +0100 Subject: [PATCH] PushRules settings: Display keywords in alphabetical order --- src/components/views/settings/Notifications.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index ce4efc694..679da47d2 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -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 {