PLT-5211 Always emove deleted channels for LHS (#5087)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
846880e814
Коммит
1fc26a152f
@@ -23,7 +23,7 @@ import LocalizationStore from 'stores/localization_store.jsx';
|
|||||||
export function buildDisplayableChannelList(persistentChannels) {
|
export function buildDisplayableChannelList(persistentChannels) {
|
||||||
const missingDMChannels = createMissingDirectChannels(persistentChannels);
|
const missingDMChannels = createMissingDirectChannels(persistentChannels);
|
||||||
|
|
||||||
const channels = persistentChannels.concat(missingDMChannels).map(completeDirectChannelInfo);
|
const channels = persistentChannels.concat(missingDMChannels).map(completeDirectChannelInfo).filter(isNotDeletedChannel);
|
||||||
channels.sort(sortChannelsByDisplayName);
|
channels.sort(sortChannelsByDisplayName);
|
||||||
|
|
||||||
const favoriteChannels = channels.filter(isFavoriteChannel);
|
const favoriteChannels = channels.filter(isFavoriteChannel);
|
||||||
@@ -43,6 +43,10 @@ export function isFavoriteChannel(channel) {
|
|||||||
return PreferenceStore.getBool(Preferences.CATEGORY_FAVORITE_CHANNEL, channel.id);
|
return PreferenceStore.getBool(Preferences.CATEGORY_FAVORITE_CHANNEL, channel.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isNotDeletedChannel(channel) {
|
||||||
|
return channel.delete_at === 0;
|
||||||
|
}
|
||||||
|
|
||||||
export function isOpenChannel(channel) {
|
export function isOpenChannel(channel) {
|
||||||
return channel.type === Constants.OPEN_CHANNEL;
|
return channel.type === Constants.OPEN_CHANNEL;
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user