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.
This commit is contained in:
George Goldberg
2017-01-18 20:46:21 +00:00
committed by enahum
parent 9c2e28e95c
commit f9b57b65ea

View File

@@ -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) {