diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-02-01 08:57:16 +0900 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2017-01-31 20:57:16 -0300 |
commit | 9ba968ce3354b1a8ab307ecc4cc785bdee16f914 (patch) | |
tree | 1180a7913c326ed66191555d5a21d0643e932b8a /webapp/utils/channel_utils.jsx | |
parent | 9369cab56c82629d505d44d572f273df1d396972 (diff) | |
download | chat-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/utils/channel_utils.jsx')
-rw-r--r-- | webapp/utils/channel_utils.jsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/webapp/utils/channel_utils.jsx b/webapp/utils/channel_utils.jsx index 2189cd789..67dcfac67 100644 --- a/webapp/utils/channel_utils.jsx +++ b/webapp/utils/channel_utils.jsx @@ -23,8 +23,11 @@ import LocalizationStore from 'stores/localization_store.jsx'; export function buildDisplayableChannelList(persistentChannels) { const missingDMChannels = createMissingDirectChannels(persistentChannels); - const channels = persistentChannels.concat(missingDMChannels).map(completeDirectChannelInfo).filter(isNotDeletedChannel); - channels.sort(sortChannelsByDisplayName); + const channels = persistentChannels. + concat(missingDMChannels). + map(completeDirectChannelInfo). + filter(isNotDeletedChannel). + sort(sortChannelsByDisplayName); const favoriteChannels = channels.filter(isFavoriteChannel); const notFavoriteChannels = channels.filter(not(isFavoriteChannel)); |