diff options
Diffstat (limited to 'app/javascript/mastodon/reducers/notifications.js')
-rw-r--r-- | app/javascript/mastodon/reducers/notifications.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/reducers/notifications.js b/app/javascript/mastodon/reducers/notifications.js index 049c70cb4..69bd47940 100644 --- a/app/javascript/mastodon/reducers/notifications.js +++ b/app/javascript/mastodon/reducers/notifications.js @@ -36,7 +36,7 @@ const notificationToMap = notification => ImmutableMap({ const normalizeNotification = (state, notification, usePendingItems) => { if (usePendingItems) { - return state.update('pendingItems', list => list.unshift(notificationToMap(notification))); + return state.update('pendingItems', list => list.unshift(notificationToMap(notification))).update('unread', unread => unread + 1); } const top = state.get('top'); @@ -91,7 +91,7 @@ const filterNotifications = (state, accountIds) => { const updateTop = (state, top) => { if (top) { - state = state.set('unread', 0); + state = state.set('unread', state.get('pendingItems').size); } return state.set('top', top); |