Fixes channel muting inside category (#6267)
This commit is contained in:
parent
b3f3ea5975
commit
8ca26bde7d
2 changed files with 1 additions and 4 deletions
|
|
@ -21,12 +21,11 @@ import type {WithDatabaseArgs} from '@typings/database/database';
|
|||
type EnhanceProps = WithDatabaseArgs & {
|
||||
channel: ChannelModel;
|
||||
showTeamName?: boolean;
|
||||
isCategoryMuted?: boolean;
|
||||
}
|
||||
|
||||
const observeIsMutedSetting = (mc: MyChannelModel) => mc.settings.observe().pipe(switchMap((s) => of$(s?.notifyProps?.mark_unread === 'mention')));
|
||||
|
||||
const enhance = withObservables(['channel', 'showTeamName', 'isCategoryMuted'], ({channel, database, showTeamName, isCategoryMuted}: EnhanceProps) => {
|
||||
const enhance = withObservables(['channel', 'showTeamName'], ({channel, database, showTeamName}: EnhanceProps) => {
|
||||
const currentUserId = observeCurrentUserId(database);
|
||||
const myChannel = observeMyChannel(database, channel.id);
|
||||
|
||||
|
|
@ -47,7 +46,6 @@ const enhance = withObservables(['channel', 'showTeamName', 'isCategoryMuted'],
|
|||
}
|
||||
return observeIsMutedSetting(mc);
|
||||
}),
|
||||
switchMap((muted) => of$(isCategoryMuted || muted)),
|
||||
);
|
||||
|
||||
let teamDisplayName = of$('');
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ const CategoryBody = ({sortedChannels, category, hiddenChannelIds, limit, onChan
|
|||
channel={item}
|
||||
testID={`category.${category.displayName.replace(/ /g, '_').toLocaleLowerCase()}.channel_list_item`}
|
||||
onPress={onChannelSwitch}
|
||||
isCategoryMuted={category.muted}
|
||||
key={item.id}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue