about summary refs log tree commit diff
path: root/app/assets/javascripts/components/actions/notifications.jsx
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-21 00:10:49 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-21 00:10:49 +0100
commit5997bb47a8a97de6cf3b69f81ef86376019f8f31 (patch)
tree679411d0d1b05f618aa6dd2a4246429a7536ac7e /app/assets/javascripts/components/actions/notifications.jsx
parentf338cc6c949515a536849522c0e33eb2790d40fa (diff)
Fix #38 - Unread indicator when new content appears above the fold
Diffstat (limited to 'app/assets/javascripts/components/actions/notifications.jsx')
-rw-r--r--app/assets/javascripts/components/actions/notifications.jsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/actions/notifications.jsx b/app/assets/javascripts/components/actions/notifications.jsx
index df82e73fc..980b7d63e 100644
--- a/app/assets/javascripts/components/actions/notifications.jsx
+++ b/app/assets/javascripts/components/actions/notifications.jsx
@@ -14,7 +14,8 @@ export const NOTIFICATIONS_EXPAND_REQUEST = 'NOTIFICATIONS_EXPAND_REQUEST';
 export const NOTIFICATIONS_EXPAND_SUCCESS = 'NOTIFICATIONS_EXPAND_SUCCESS';
 export const NOTIFICATIONS_EXPAND_FAIL    = 'NOTIFICATIONS_EXPAND_FAIL';
 
-export const NOTIFICATIONS_CLEAR = 'NOTIFICATIONS_CLEAR';
+export const NOTIFICATIONS_CLEAR      = 'NOTIFICATIONS_CLEAR';
+export const NOTIFICATIONS_SCROLL_TOP = 'NOTIFICATIONS_SCROLL_TOP';
 
 const fetchRelatedRelationships = (dispatch, notifications) => {
   const accountIds = notifications.filter(item => item.type === 'follow').map(item => item.account.id);
@@ -151,3 +152,10 @@ export function clearNotifications() {
     api(getState).post('/api/v1/notifications/clear');
   };
 };
+
+export function scrollTopNotifications(top) {
+  return {
+    type: NOTIFICATIONS_SCROLL_TOP,
+    top
+  };
+};