Keep track of unread notifications when the notification column isn't mounted

This commit is contained in:
Thibaut Girka
2018-09-06 15:47:13 +02:00
committed by ThibG
parent 711826cb37
commit c8875b4d8a
3 changed files with 58 additions and 7 deletions

View File

@@ -25,6 +25,9 @@ export const NOTIFICATIONS_EXPAND_FAIL = 'NOTIFICATIONS_EXPAND_FAIL';
export const NOTIFICATIONS_CLEAR = 'NOTIFICATIONS_CLEAR';
export const NOTIFICATIONS_SCROLL_TOP = 'NOTIFICATIONS_SCROLL_TOP';
export const NOTIFICATIONS_MOUNT = 'NOTIFICATIONS_MOUNT';
export const NOTIFICATIONS_UNMOUNT = 'NOTIFICATIONS_UNMOUNT';
defineMessages({
mention: { id: 'notification.mention', defaultMessage: '{name} mentioned you' },
});
@@ -216,3 +219,15 @@ export function deleteMarkedNotificationsSuccess() {
type: NOTIFICATIONS_DELETE_MARKED_SUCCESS,
};
};
export function mountNotifications() {
return {
type: NOTIFICATIONS_MOUNT,
};
};
export function unmountNotifications() {
return {
type: NOTIFICATIONS_UNMOUNT,
};
};