diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 6deb76d39..a44ea3a65 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -236,6 +236,9 @@ class MainController extends Component { const appOptions = this.props.storeAppOptions; const appSettings = this.props.storeApplicationSettings; + const storeDocumentInfo = this.props.storeDocumentInfo; + const dataDoc = storeDocumentInfo.dataDoc; + const isExtRestriction = dataDoc.fileType !== 'oform'; f7.emit('resize'); @@ -268,7 +271,7 @@ class MainController extends Component { value = LocalStorage.getBool('mobile-view', true); - if(value) { + if(value && isExtRestriction) { this.api.ChangeReaderMode(); } else { appOptions.changeMobileView(); diff --git a/apps/documenteditor/mobile/src/view/Toolbar.jsx b/apps/documenteditor/mobile/src/view/Toolbar.jsx index 619ee7f69..e813b89bc 100644 --- a/apps/documenteditor/mobile/src/view/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/view/Toolbar.jsx @@ -8,7 +8,7 @@ const ToolbarView = props => { const { t } = useTranslation(); const isDisconnected = props.isDisconnected; const docExt = props.docExt; - const isAvailableExt = docExt && docExt !== 'djvu' && docExt !== 'pdf' && docExt !== 'xps'; + const isAvailableExt = docExt && docExt !== 'djvu' && docExt !== 'pdf' && docExt !== 'xps' && docExt !== 'oform'; const disableEditBtn = props.isObjectLocked || props.stateDisplayMode || props.disabledEditControls || isDisconnected; const isViewer = props.isViewer; const isMobileView = props.isMobileView; @@ -62,7 +62,7 @@ const ToolbarView = props => { onRedoClick: props.onRedo })} {/*isAvailableExt && !props.disabledControls &&*/} - {(isViewer || !Device.phone) && { + {((isViewer || !Device.phone) && isAvailableExt) && { props.changeMobileView(); props.openOptions('snackbar'); }}>}