[DE mobile] Correct opening snackbar

This commit is contained in:
SergeyEzhin 2022-08-26 19:24:26 +03:00
parent 5c00b9fa57
commit a83c32c793
2 changed files with 7 additions and 7 deletions

View file

@ -81,15 +81,15 @@ const Settings = props => {
}, 0);
};
const onChangeMobileView = () => {
const api = Common.EditorApi.get()
const onChangeMobileView = async () => {
const api = Common.EditorApi.get();
const appOptions = props.storeAppOptions;
appOptions.changeMobileView();
api.ChangeReaderMode();
await appOptions.changeMobileView();
await api.ChangeReaderMode();
if(Device.phone) {
closeModal();
await closeModal();
}
}

View file

@ -166,7 +166,7 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
<Toggle checked={isMobileView} onToggleChange={() => {
props.onChangeMobileView();
props.openOptions('snackbar');
setTimeout( () => {
setTimeout(() => {
props.closeOptions('snackbar');
}, 1000);
}} />