mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-27 06:46:24 +01:00
15 lines
403 B
React
15 lines
403 B
React
|
import { openModal } from './modal';
|
||
|
import { changeSetting, saveSettings } from './settings';
|
||
|
|
||
|
export function showOnboardingOnce() {
|
||
|
return (dispatch, getState) => {
|
||
|
const alreadySeen = getState().getIn(['settings', 'onboarded']);
|
||
|
|
||
|
if (!alreadySeen) {
|
||
|
dispatch(openModal('ONBOARDING'));
|
||
|
dispatch(changeSetting(['onboarded'], true));
|
||
|
dispatch(saveSettings());
|
||
|
}
|
||
|
};
|
||
|
};
|