about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-09-06 17:47:33 +0200
committerThibG <thib@sitedethib.com>2018-09-07 20:37:17 +0200
commitd315f1dc02f15b55585a853ac19aefbe6983d87d (patch)
tree99e4cc8c672fa25ae05161f455fa294522007109 /app/javascript/flavours/glitch/actions
parentc8875b4d8aa00abd0ef432c025d479a8990202f1 (diff)
Count unread notifications when window loses focus
Diffstat (limited to 'app/javascript/flavours/glitch/actions')
-rw-r--r--app/javascript/flavours/glitch/actions/notifications.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js
index ee148e4ef..fb84cd01e 100644
--- a/app/javascript/flavours/glitch/actions/notifications.js
+++ b/app/javascript/flavours/glitch/actions/notifications.js
@@ -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,
+  };
+};