Merge pull request #1411 from hmhealey/plt876
PLT-876 Sorted channel list before rendering them in the sidebar
Этот коммит содержится в:
@@ -106,6 +106,8 @@ export default class Sidebar extends React.Component {
|
|||||||
const currentChannelId = ChannelStore.getCurrentId();
|
const currentChannelId = ChannelStore.getCurrentId();
|
||||||
|
|
||||||
const channels = Object.assign([], ChannelStore.getAll());
|
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 publicChannels = channels.filter((channel) => channel.type === Constants.OPEN_CHANNEL);
|
||||||
const privateChannels = channels.filter((channel) => channel.type === Constants.PRIVATE_CHANNEL);
|
const privateChannels = channels.filter((channel) => channel.type === Constants.PRIVATE_CHANNEL);
|
||||||
const directChannels = channels.filter((channel) => channel.type === Constants.DM_CHANNEL);
|
const directChannels = channels.filter((channel) => channel.type === Constants.DM_CHANNEL);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user