forked from Ivasoft/mattermost-mobile
Show the current channel when category is collapsed on tablets (#6888)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user