Show the current channel when category is collapsed on tablets (#6888)
This commit is contained in:
parent
bcb8ffa2d1
commit
9da7b47827
2 changed files with 7 additions and 3 deletions
|
|
@ -404,7 +404,13 @@ export async function setCurrentTeamAndChannelId(operator: ServerDataOperator, t
|
|||
export const observeLastUnreadChannelId = (database: Database): Observable<string> => {
|
||||
return querySystemValue(database, SYSTEM_IDENTIFIERS.LAST_UNREAD_CHANNEL_ID).observe().pipe(
|
||||
switchMap((result) => (result.length ? result[0].observe() : of$({value: ''}))),
|
||||
switchMap((model) => of$(model.value)),
|
||||
switchMap((model) => {
|
||||
if (model.value) {
|
||||
return of$(model.value);
|
||||
}
|
||||
|
||||
return observeCurrentChannelId(database);
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -162,8 +162,6 @@ const enhance = withObservables(['category', 'isTablet', 'locale'], ({category,
|
|||
return {
|
||||
limit,
|
||||
sortedChannels,
|
||||
notifyProps,
|
||||
lastUnreadId,
|
||||
unreadsOnTop,
|
||||
unreadIds,
|
||||
category,
|
||||
|
|
|
|||
Loading…
Reference in a new issue