Merge pull request #1411 from hmhealey/plt876

PLT-876 Sorted channel list before rendering them in the sidebar
Этот коммит содержится в:
Christopher Speller
2015-11-12 12:36:41 -05:00
родитель c1ab5adb20 3c40a683a1
Коммит cce0dc19e6

Просмотреть файл

@@ -106,6 +106,8 @@ export default class Sidebar extends React.Component {
const currentChannelId = ChannelStore.getCurrentId();
const channels = Object.assign([], ChannelStore.getAll());
channels.sort((a, b) => a.display_name.localeCompare(b.display_name));
const publicChannels = channels.filter((channel) => channel.type === Constants.OPEN_CHANNEL);
const privateChannels = channels.filter((channel) => channel.type === Constants.PRIVATE_CHANNEL);
const directChannels = channels.filter((channel) => channel.type === Constants.DM_CHANNEL);