Count unread notifications when window loses focus

This commit is contained in:
Thibaut Girka
2018-09-06 17:47:33 +02:00
committed by ThibG
parent c8875b4d8a
commit d315f1dc02
3 changed files with 65 additions and 6 deletions

View File

@@ -28,6 +28,8 @@ export const NOTIFICATIONS_SCROLL_TOP = 'NOTIFICATIONS_SCROLL_TOP';
export const NOTIFICATIONS_MOUNT = 'NOTIFICATIONS_MOUNT';
export const NOTIFICATIONS_UNMOUNT = 'NOTIFICATIONS_UNMOUNT';
export const NOTIFICATIONS_SET_VISIBILITY = 'NOTIFICATIONS_SET_VISIBILITY';
defineMessages({
mention: { id: 'notification.mention', defaultMessage: '{name} mentioned you' },
});
@@ -231,3 +233,10 @@ export function unmountNotifications() {
type: NOTIFICATIONS_UNMOUNT,
};
};
export function notificationsSetVisibility(visibility) {
return {
type: NOTIFICATIONS_SET_VISIBILITY,
visibility: visibility,
};
};