mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
PushRules settings: Display keywords in alphabetical order
This commit is contained in:
parent
0577edb055
commit
378f4bb85c
@ -59,9 +59,6 @@ module.exports = React.createClass({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
keywordsDialogDiv: "",
|
|
||||||
newKeywords: undefined,
|
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
this._refreshFromServer();
|
this._refreshFromServer();
|
||||||
},
|
},
|
||||||
@ -170,7 +167,6 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
onKeywordsClicked: function(event) {
|
onKeywordsClicked: function(event) {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.newKeywords = undefined;
|
|
||||||
|
|
||||||
// Compute the keywords list to display
|
// Compute the keywords list to display
|
||||||
var keywords = [];
|
var keywords = [];
|
||||||
@ -179,6 +175,10 @@ module.exports = React.createClass({
|
|||||||
keywords.push(rule.pattern);
|
keywords.push(rule.pattern);
|
||||||
}
|
}
|
||||||
if (keywords.length) {
|
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(", ");
|
keywords = keywords.join(", ");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user