2022-01-10 14:17:52 -08:00
|
|
|
import { register, saveSettings } from './registerer';
|
2020-03-27 13:59:38 -07:00
|
|
|
import {
|
|
|
|
SET_BROWSER_SUPPORT,
|
|
|
|
SET_SUBSCRIPTION,
|
|
|
|
CLEAR_SUBSCRIPTION,
|
|
|
|
SET_ALERTS,
|
|
|
|
setAlerts,
|
|
|
|
} from './setter';
|
|
|
|
|
2022-06-13 14:23:49 -07:00
|
|
|
import type { AppDispatch } from 'soapbox/store';
|
|
|
|
|
2020-03-27 13:59:38 -07:00
|
|
|
export {
|
|
|
|
SET_BROWSER_SUPPORT,
|
|
|
|
SET_SUBSCRIPTION,
|
|
|
|
CLEAR_SUBSCRIPTION,
|
|
|
|
SET_ALERTS,
|
|
|
|
register,
|
2022-06-15 13:11:36 -07:00
|
|
|
changeAlerts,
|
2020-03-27 13:59:38 -07:00
|
|
|
};
|
|
|
|
|
2022-06-15 13:11:36 -07:00
|
|
|
const changeAlerts = (path: Array<string>, value: any) =>
|
2022-06-13 14:23:49 -07:00
|
|
|
(dispatch: AppDispatch) => {
|
2020-03-27 13:59:38 -07:00
|
|
|
dispatch(setAlerts(path, value));
|
2022-06-13 14:23:49 -07:00
|
|
|
dispatch(saveSettings() as any);
|
2020-03-27 13:59:38 -07:00
|
|
|
};
|