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:
committed by
Eugen Rochko
parent
081956742c
commit
35fdf561be
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());
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user