Refactor web_push_subscription (#6047)
* Remove onSave method in mapped properties for column_settings * Make web_push_subscription.register an action
This commit is contained in:
parent
081956742c
commit
35fdf561be
9 changed files with 213 additions and 199 deletions
23
app/javascript/mastodon/actions/push_notifications/index.js
Normal file
23
app/javascript/mastodon/actions/push_notifications/index.js
Normal file
|
@ -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());
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue