From b8f7ccf22729b77fbb5a44ecda01de5329d07adc Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 21 Dec 2019 12:08:49 -0600 Subject: add option to set mutes that apply only to timelines --- app/javascript/flavours/glitch/reducers/mutes.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/javascript/flavours/glitch/reducers/mutes.js') diff --git a/app/javascript/flavours/glitch/reducers/mutes.js b/app/javascript/flavours/glitch/reducers/mutes.js index 8f52a7704..d66909188 100644 --- a/app/javascript/flavours/glitch/reducers/mutes.js +++ b/app/javascript/flavours/glitch/reducers/mutes.js @@ -3,6 +3,7 @@ import Immutable from 'immutable'; import { MUTES_INIT_MODAL, MUTES_TOGGLE_HIDE_NOTIFICATIONS, + MUTES_TOGGLE_TIMELINES_ONLY, } from 'flavours/glitch/actions/mutes'; const initialState = Immutable.Map({ @@ -10,6 +11,7 @@ const initialState = Immutable.Map({ isSubmitting: false, account: null, notifications: true, + timelinesOnly: false, }), }); @@ -20,9 +22,12 @@ export default function mutes(state = initialState, action) { state.setIn(['new', 'isSubmitting'], false); state.setIn(['new', 'account'], action.account); state.setIn(['new', 'notifications'], true); + state.setIn(['new', 'timelinesOnly'], false); }); case MUTES_TOGGLE_HIDE_NOTIFICATIONS: return state.updateIn(['new', 'notifications'], (old) => !old); + case MUTES_TOGGLE_TIMELINES_ONLY: + return state.updateIn(['new', 'timelines_only'], (old) => !old); default: return state; } -- cgit