From ac035108aaa2585af146fc28e4a2314c06e63e65 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 7 Feb 2017 00:06:40 +0100 Subject: Add "clear notifications" button, exclude posts from people who have blocked *you* from public/hashtag timelines --- app/assets/javascripts/components/reducers/notifications.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/assets/javascripts/components/reducers/notifications.jsx') diff --git a/app/assets/javascripts/components/reducers/notifications.jsx b/app/assets/javascripts/components/reducers/notifications.jsx index 482093c33..4a7af8856 100644 --- a/app/assets/javascripts/components/reducers/notifications.jsx +++ b/app/assets/javascripts/components/reducers/notifications.jsx @@ -5,7 +5,8 @@ import { NOTIFICATIONS_REFRESH_REQUEST, NOTIFICATIONS_EXPAND_REQUEST, NOTIFICATIONS_REFRESH_FAIL, - NOTIFICATIONS_EXPAND_FAIL + NOTIFICATIONS_EXPAND_FAIL, + NOTIFICATIONS_CLEAR } from '../actions/notifications'; import { ACCOUNT_BLOCK_SUCCESS } from '../actions/accounts'; import Immutable from 'immutable'; @@ -75,6 +76,8 @@ export default function notifications(state = initialState, action) { return appendNormalizedNotifications(state, action.notifications, action.next); case ACCOUNT_BLOCK_SUCCESS: return filterNotifications(state, action.relationship); + case NOTIFICATIONS_CLEAR: + return state.set('items', Immutable.List()).set('next', null); default: return state; } -- cgit