Sort favorite channels alphabetically regardless of type (#5739)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
91355f0e7d
Коммит
04c0223c64
@@ -636,13 +636,15 @@ export default class Sidebar extends React.Component {
|
|||||||
this.lastUnreadChannel = null;
|
this.lastUnreadChannel = null;
|
||||||
|
|
||||||
// create elements for all 4 types of channels
|
// create elements for all 4 types of channels
|
||||||
const favoriteItems = this.state.favoriteChannels.map((channel, index, arr) => {
|
const favoriteItems = this.state.favoriteChannels.
|
||||||
if (channel.type === Constants.DM_CHANNEL) {
|
sort(Utils.sortTeamsByDisplayName).
|
||||||
return this.createChannelElement(channel, index, arr, this.handleLeaveDirectChannel);
|
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);
|
const publicChannelItems = this.state.publicChannels.map(this.createChannelElement);
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user