summaryrefslogtreecommitdiffstats
path: root/webapp/stores
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-02-01 08:57:16 +0900
committerenahum <nahumhbl@gmail.com>2017-01-31 20:57:16 -0300
commit9ba968ce3354b1a8ab307ecc4cc785bdee16f914 (patch)
tree1180a7913c326ed66191555d5a21d0643e932b8a /webapp/stores
parent9369cab56c82629d505d44d572f273df1d396972 (diff)
downloadchat-9ba968ce3354b1a8ab307ecc4cc785bdee16f914.tar.gz
chat-9ba968ce3354b1a8ab307ecc4cc785bdee16f914.tar.bz2
chat-9ba968ce3354b1a8ab307ecc4cc785bdee16f914.zip
Use consistent Display Name sorting code throughout the webapp #5159 (#5213)
* Use consistent Display Name sorting code throughout the webapp #5159 * fixed broken sorting of teams and channels
Diffstat (limited to 'webapp/stores')
-rw-r--r--webapp/stores/channel_store.jsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx
index 30f395cc3..575f68f4c 100644
--- a/webapp/stores/channel_store.jsx
+++ b/webapp/stores/channel_store.jsx
@@ -204,10 +204,10 @@ class ChannelStoreClass extends EventEmitter {
}
if (!Utils) {
- Utils = require('utils/utils.jsx'); //eslint-disable-line global-require
+ Utils = require('utils/channel_utils.jsx'); //eslint-disable-line global-require
}
- channels.sort(Utils.sortByDisplayName);
+ channels = channels.sort(Utils.sortChannelsByDisplayName);
this.storeChannels(channels);
}
@@ -286,10 +286,10 @@ class ChannelStoreClass extends EventEmitter {
const teamChannels = this.moreChannels[teamId] || {};
if (!Utils) {
- Utils = require('utils/utils.jsx'); //eslint-disable-line global-require
+ Utils = require('utils/channel_utils.jsx'); //eslint-disable-line global-require
}
- return Object.keys(teamChannels).map((cid) => teamChannels[cid]).sort(Utils.sortByDisplayName);
+ return Object.keys(teamChannels).map((cid) => teamChannels[cid]).sort(Utils.sortChannelsByDisplayName);
}
storeStats(stats) {