summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-01-18 20:46:21 +0000
committerenahum <nahumhbl@gmail.com>2017-01-18 17:46:21 -0300
commitf9b57b65ea8841276cc2803399341566ea875062 (patch)
treeeffd146ba4e4c259dcc5723f71cb4532d040bd56
parent9c2e28e95c89576482a3218cf906658e7d8c6c79 (diff)
downloadchat-f9b57b65ea8841276cc2803399341566ea875062.tar.gz
chat-f9b57b65ea8841276cc2803399341566ea875062.tar.bz2
chat-f9b57b65ea8841276cc2803399341566ea875062.zip
PLT-5135: Fix left channel in more channels list. (#5114)
The problem was it was not being sorted, so appeared at the bottom of the list.
-rw-r--r--webapp/stores/channel_store.jsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx
index c1922d3a6..30f395cc3 100644
--- a/webapp/stores/channel_store.jsx
+++ b/webapp/stores/channel_store.jsx
@@ -284,7 +284,12 @@ class ChannelStoreClass extends EventEmitter {
getMoreChannelsList(teamId = TeamStore.getCurrentId()) {
const teamChannels = this.moreChannels[teamId] || {};
- return Object.keys(teamChannels).map((cid) => teamChannels[cid]);
+
+ if (!Utils) {
+ Utils = require('utils/utils.jsx'); //eslint-disable-line global-require
+ }
+
+ return Object.keys(teamChannels).map((cid) => teamChannels[cid]).sort(Utils.sortByDisplayName);
}
storeStats(stats) {