mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-25 09:34:16 -05:00
a69ca29473
Add missing controls for new notification type
22 lines
922 B
JavaScript
22 lines
922 B
JavaScript
import { changeSetting, saveSettings } from './settings';
|
|
import { requestBrowserPermission } from './notifications';
|
|
|
|
export const INTRODUCTION_VERSION = 20181216044202;
|
|
|
|
export const closeOnboarding = () => dispatch => {
|
|
dispatch(changeSetting(['introductionVersion'], INTRODUCTION_VERSION));
|
|
dispatch(saveSettings());
|
|
|
|
dispatch(requestBrowserPermission((permission) => {
|
|
if (permission === 'granted') {
|
|
dispatch(changeSetting(['notifications', 'alerts', 'follow'], true));
|
|
dispatch(changeSetting(['notifications', 'alerts', 'favourite'], true));
|
|
dispatch(changeSetting(['notifications', 'alerts', 'reblog'], true));
|
|
dispatch(changeSetting(['notifications', 'alerts', 'mention'], true));
|
|
dispatch(changeSetting(['notifications', 'alerts', 'poll'], true));
|
|
dispatch(changeSetting(['notifications', 'alerts', 'status'], true));
|
|
dispatch(saveSettings());
|
|
}
|
|
}));
|
|
};
|