mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-23 22:48:07 +01:00
[Glitch] Fix unread notification count when polling
Port 92f1d739b5
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
bb0c9fcde7
commit
1a591ffc8b
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ const expandNormalizedNotifications = (state, notifications, next, isLoadingRece
|
|||
}
|
||||
|
||||
if (shouldCountUnreadNotifications(state)) {
|
||||
mutable.update('unread', unread => unread + items.count(item => compareId(item.get('id'), lastReadId) > 0));
|
||||
mutable.set('unread', mutable.get('pendingItems').count(item => item !== null) + mutable.get('items').count(item => item && compareId(item.get('id'), lastReadId) > 0));
|
||||
} else {
|
||||
const mostRecent = items.find(item => item !== null);
|
||||
if (mostRecent && compareId(lastReadId, mostRecent.get('id')) < 0) {
|
||||
|
|
Loading…
Reference in a new issue