From 78190cbc47f1d7251cc27c45653dd038be32b5b5 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Wed, 15 Feb 2023 17:08:43 +0200 Subject: [PATCH] Observe on is_unread in the channel list unread section (#7133) --- .../channel_list/categories_list/categories/unreads/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/screens/home/channel_list/categories_list/categories/unreads/index.ts b/app/screens/home/channel_list/categories_list/categories/unreads/index.ts index 54163f3f0f..dee116dd6b 100644 --- a/app/screens/home/channel_list/categories_list/categories/unreads/index.ts +++ b/app/screens/home/channel_list/categories_list/categories/unreads/index.ts @@ -49,12 +49,12 @@ const enhanced = withObservables(['currentTeamId', 'isTablet', 'onlyUnreads'], ( const lastUnread = isTablet ? observeLastUnreadChannelId(database).pipe( switchMap(getC), ) : of$(undefined); - const myUnreadChannels = queryMyChannelUnreads(database, currentTeamId).observeWithColumns(['last_post_at']); + const myUnreadChannels = queryMyChannelUnreads(database, currentTeamId).observeWithColumns(['last_post_at', 'is_unread']); const notifyProps = myUnreadChannels.pipe(switchMap((cs) => observeNotifyPropsByChannels(database, cs))); const channels = myUnreadChannels.pipe(switchMap((myChannels) => observeChannelsByLastPostAt(database, myChannels))); const channelsMap = channels.pipe(switchMap((cs) => of$(makeChannelsMap(cs)))); - return queryMyChannelUnreads(database, currentTeamId).observeWithColumns(['last_post_at']).pipe( + return queryMyChannelUnreads(database, currentTeamId).observeWithColumns(['last_post_at', 'is_unread']).pipe( combineLatestWith(channelsMap, notifyProps), map(filterAndSortMyChannels), combineLatestWith(lastUnread),