Add button to manually mark all notifications as read

This commit is contained in:
Thibaut Girka
2020-09-15 23:42:58 +02:00
committed by ThibG
parent 94c290d7d2
commit f1c0cf9806
3 changed files with 41 additions and 3 deletions

View File

@@ -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;
}