Merge pull request #290 from chriswmartin/web-push-updates

Web push updates
This commit is contained in:
beatrix
2018-01-05 18:29:57 -05:00
committed by GitHub
9 changed files with 228 additions and 139 deletions
@@ -1,5 +1,5 @@
import { STORE_HYDRATE } from 'flavours/glitch/actions/store';
import { SET_BROWSER_SUPPORT, SET_SUBSCRIPTION, CLEAR_SUBSCRIPTION, ALERTS_CHANGE } from 'flavours/glitch/actions/push_notifications';
import { SET_BROWSER_SUPPORT, SET_SUBSCRIPTION, CLEAR_SUBSCRIPTION, SET_ALERTS } from 'flavours/glitch/actions/push_notifications';
import Immutable from 'immutable';
const initialState = Immutable.Map({
@@ -43,7 +43,7 @@ export default function push_subscriptions(state = initialState, action) {
return state.set('browserSupport', action.value);
case CLEAR_SUBSCRIPTION:
return initialState;
case ALERTS_CHANGE:
case SET_ALERTS:
return state.setIn(action.key, action.value);
default:
return state;