diff options
author | beatrix <beatrix.bitrot@gmail.com> | 2018-01-05 18:29:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-05 18:29:57 -0500 |
commit | f441770e50621ac59a7b022ee2127964935b2b8d (patch) | |
tree | bd7bca6f161424f2fa6c6595fe70bb2d7df1074f /app/javascript/flavours/glitch/actions/push_notifications/index.js | |
parent | b4e667f86b645a1ddaa7944b61c2d6ca3b9e3981 (diff) | |
parent | 72b99f6ee416888ad4ea041c4cf90390c75e6861 (diff) |
Merge pull request #290 from chriswmartin/web-push-updates
Web push updates
Diffstat (limited to 'app/javascript/flavours/glitch/actions/push_notifications/index.js')
-rw-r--r-- | app/javascript/flavours/glitch/actions/push_notifications/index.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/push_notifications/index.js b/app/javascript/flavours/glitch/actions/push_notifications/index.js new file mode 100644 index 000000000..376b55b62 --- /dev/null +++ b/app/javascript/flavours/glitch/actions/push_notifications/index.js @@ -0,0 +1,23 @@ +import { + SET_BROWSER_SUPPORT, + SET_SUBSCRIPTION, + CLEAR_SUBSCRIPTION, + SET_ALERTS, + setAlerts, +} from './setter'; +import { register, saveSettings } from './registerer'; + +export { + SET_BROWSER_SUPPORT, + SET_SUBSCRIPTION, + CLEAR_SUBSCRIPTION, + SET_ALERTS, + register, +}; + +export function changeAlerts(key, value) { + return dispatch => { + dispatch(setAlerts(key, value)); + dispatch(saveSettings()); + }; +} |