gab-social/app/javascript/gabsocial/actions/push_notifications/index.js

22 lines
402 B
JavaScript
Raw Normal View History

2019-07-02 08:10:25 +01:00
import {
SET_BROWSER_SUPPORT,
SET_SUBSCRIPTION,
CLEAR_SUBSCRIPTION,
SET_ALERTS,
setAlerts,
2020-11-15 18:48:32 +00:00
} from './setter'
import { register, saveSettings } from './registerer'
2019-07-02 08:10:25 +01:00
export {
SET_BROWSER_SUPPORT,
SET_SUBSCRIPTION,
CLEAR_SUBSCRIPTION,
SET_ALERTS,
register,
2020-11-15 18:48:32 +00:00
}
2019-07-02 08:10:25 +01:00
2020-11-15 18:48:32 +00:00
export const changeAlerts = (path, value) => (dispatch) => {
dispatch(setAlerts(path, value))
dispatch(saveSettings())
2019-07-02 08:10:25 +01:00
}