diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-09-15 23:42:58 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2020-09-17 15:22:56 +0200 |
commit | f1c0cf98061eee5eb6130b167d033c851ee58f14 (patch) | |
tree | 29d64ec65bc8c3648c48cb52694e981072a5d84c /app/javascript/flavours/glitch/reducers | |
parent | 94c290d7d2179adeb0437c00b571f62c41c7fd12 (diff) |
Add button to manually mark all notifications as read
Diffstat (limited to 'app/javascript/flavours/glitch/reducers')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/notifications.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/reducers/notifications.js b/app/javascript/flavours/glitch/reducers/notifications.js index 7f6784eae..122fd009c 100644 --- a/app/javascript/flavours/glitch/reducers/notifications.js +++ b/app/javascript/flavours/glitch/reducers/notifications.js @@ -16,6 +16,7 @@ import { NOTIFICATIONS_DELETE_MARKED_FAIL, NOTIFICATIONS_ENTER_CLEARING_MODE, NOTIFICATIONS_MARK_ALL_FOR_DELETE, + NOTIFICATIONS_MARK_AS_READ, } from 'flavours/glitch/actions/notifications'; import { ACCOUNT_BLOCK_SUCCESS, @@ -297,6 +298,9 @@ export default function notifications(state = initialState, action) { } return markAllForDelete(st, action.yes); + case NOTIFICATIONS_MARK_AS_READ: + return recountUnread(state, state.get('items').first().get('id')); + default: return state; } |