[DE mobile] Correct opening snackbar
This commit is contained in:
parent
5c00b9fa57
commit
a83c32c793
|
@ -81,15 +81,15 @@ const Settings = props => {
|
||||||
}, 0);
|
}, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onChangeMobileView = () => {
|
const onChangeMobileView = async () => {
|
||||||
const api = Common.EditorApi.get()
|
const api = Common.EditorApi.get();
|
||||||
const appOptions = props.storeAppOptions;
|
const appOptions = props.storeAppOptions;
|
||||||
|
|
||||||
appOptions.changeMobileView();
|
await appOptions.changeMobileView();
|
||||||
api.ChangeReaderMode();
|
await api.ChangeReaderMode();
|
||||||
|
|
||||||
if(Device.phone) {
|
if(Device.phone) {
|
||||||
closeModal();
|
await closeModal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
|
||||||
<Toggle checked={isMobileView} onToggleChange={() => {
|
<Toggle checked={isMobileView} onToggleChange={() => {
|
||||||
props.onChangeMobileView();
|
props.onChangeMobileView();
|
||||||
props.openOptions('snackbar');
|
props.openOptions('snackbar');
|
||||||
setTimeout( () => {
|
setTimeout(() => {
|
||||||
props.closeOptions('snackbar');
|
props.closeOptions('snackbar');
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}} />
|
}} />
|
||||||
|
|
Loading…
Reference in a new issue