tootlab-mastodon/app/javascript/mastodon/actions/push_notifications/index.js
Akihiko Odaki 35fdf561be Refactor web_push_subscription (#6047)
* Remove onSave method in mapped properties for column_settings

* Make web_push_subscription.register an action
2017-12-24 04:47:35 +01:00

24 lines
420 B
JavaScript

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());
};
}