diff options
Diffstat (limited to 'app/javascript/flavours/glitch/reducers/notifications.js')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/notifications.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/reducers/notifications.js b/app/javascript/flavours/glitch/reducers/notifications.js index b4c5ef71a..859a8b3a1 100644 --- a/app/javascript/flavours/glitch/reducers/notifications.js +++ b/app/javascript/flavours/glitch/reducers/notifications.js @@ -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) { |