Skip to content

Commit

Permalink
Merge 156afc8 into 482a0fb
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Wang committed Mar 11, 2017
2 parents 482a0fb + 156afc8 commit a59bded
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions webapp/components/sidebar.jsx
Expand Up @@ -636,13 +636,15 @@ export default class Sidebar extends React.Component {
this.lastUnreadChannel = null;

// create elements for all 4 types of channels
const favoriteItems = this.state.favoriteChannels.map((channel, index, arr) => {
if (channel.type === Constants.DM_CHANNEL) {
return this.createChannelElement(channel, index, arr, this.handleLeaveDirectChannel);
}
const favoriteItems = this.state.favoriteChannels.
sort(Utils.sortTeamsByDisplayName).
map((channel, index, arr) => {
if (channel.type === Constants.DM_CHANNEL) {
return this.createChannelElement(channel, index, arr, this.handleLeaveDirectChannel);
}

return this.createChannelElement(channel);
});
return this.createChannelElement(channel);
});

const publicChannelItems = this.state.publicChannels.map(this.createChannelElement);

Expand Down

0 comments on commit a59bded

Please sign in to comment.