[DE mobile] Fix Bug 58748
This commit is contained in:
parent
d545f86c3b
commit
77c8bd1d71
|
@ -257,6 +257,14 @@ class MainController extends Component {
|
||||||
appSettings.changeShowTableEmptyLine(value);
|
appSettings.changeShowTableEmptyLine(value);
|
||||||
this.api.put_ShowTableEmptyLine(value);
|
this.api.put_ShowTableEmptyLine(value);
|
||||||
|
|
||||||
|
value = LocalStorage.getBool('mobile-view', true);
|
||||||
|
|
||||||
|
if(value) {
|
||||||
|
this.api.ChangeReaderMode();
|
||||||
|
} else {
|
||||||
|
appOptions.changeMobileView();
|
||||||
|
}
|
||||||
|
|
||||||
if (appOptions.isEdit && this.needToUpdateVersion) {
|
if (appOptions.isEdit && this.needToUpdateVersion) {
|
||||||
Common.Notifications.trigger('api:disconnect');
|
Common.Notifications.trigger('api:disconnect');
|
||||||
}
|
}
|
||||||
|
@ -273,7 +281,6 @@ class MainController extends Component {
|
||||||
this.api.Resize();
|
this.api.Resize();
|
||||||
this.api.zoomFitToWidth();
|
this.api.zoomFitToWidth();
|
||||||
this.api.asc_GetDefaultTableStyles && setTimeout(() => {this.api.asc_GetDefaultTableStyles()}, 1);
|
this.api.asc_GetDefaultTableStyles && setTimeout(() => {this.api.asc_GetDefaultTableStyles()}, 1);
|
||||||
this.api.ChangeReaderMode();
|
|
||||||
this.applyLicense();
|
this.applyLicense();
|
||||||
|
|
||||||
Common.Notifications.trigger('document:ready');
|
Common.Notifications.trigger('document:ready');
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { f7 } from 'framework7-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import ToolbarView from "../view/Toolbar";
|
import ToolbarView from "../view/Toolbar";
|
||||||
import {storeAppOptions} from "../store/appOptions";
|
import {storeAppOptions} from "../store/appOptions";
|
||||||
|
import {LocalStorage} from "../../../../common/mobile/utils/LocalStorage";
|
||||||
|
|
||||||
const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'storeFocusObjects', 'storeToolbarSettings','storeDocumentInfo')(observer(props => {
|
const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'storeFocusObjects', 'storeToolbarSettings','storeDocumentInfo')(observer(props => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
|
@ -145,7 +146,9 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
|
||||||
|
|
||||||
const changeMobileView = () => {
|
const changeMobileView = () => {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
|
const isMobileView = appOptions.isMobileView;
|
||||||
|
|
||||||
|
LocalStorage.setBool('mobile-view', !isMobileView);
|
||||||
appOptions.changeMobileView();
|
appOptions.changeMobileView();
|
||||||
api.ChangeReaderMode();
|
api.ChangeReaderMode();
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { observer, inject } from "mobx-react";
|
||||||
import {Device} from '../../../../../common/mobile/utils/device';
|
import {Device} from '../../../../../common/mobile/utils/device';
|
||||||
|
|
||||||
import SettingsView from "../../view/settings/Settings";
|
import SettingsView from "../../view/settings/Settings";
|
||||||
|
import {LocalStorage} from "../../../../../common/mobile/utils/LocalStorage";
|
||||||
|
|
||||||
const Settings = props => {
|
const Settings = props => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -84,7 +85,9 @@ const Settings = props => {
|
||||||
const onChangeMobileView = async () => {
|
const onChangeMobileView = async () => {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
const appOptions = props.storeAppOptions;
|
const appOptions = props.storeAppOptions;
|
||||||
|
const isMobileView = appOptions.isMobileView;
|
||||||
|
|
||||||
|
await LocalStorage.setBool('mobile-view', !isMobileView);
|
||||||
await appOptions.changeMobileView();
|
await appOptions.changeMobileView();
|
||||||
await api.ChangeReaderMode();
|
await api.ChangeReaderMode();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue