diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 75c6e4ee4..b67d760c7 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -109,6 +109,9 @@ class MainPage extends Component { render() { const { t } = this.props; const appOptions = this.props.storeAppOptions; + const storeDocumentInfo = this.props.storeDocumentInfo; + const docExt = storeDocumentInfo.dataDoc ? storeDocumentInfo.dataDoc.fileType : ''; + const isAvailableExt = docExt && docExt !== 'djvu' && docExt !== 'pdf' && docExt !== 'xps'; const storeToolbarSettings = this.props.storeToolbarSettings; const isDisconnected = this.props.users.isDisconnected; const isViewer = appOptions.isViewer; @@ -214,7 +217,7 @@ class MainPage extends Component { text={isMobileView ? t("Toolbar.textSwitchedMobileView") : t("Toolbar.textSwitchedStandardView")}/> } - {isViewer && !disabledSettings && !disabledControls && !isDisconnected && + {isViewer && !disabledSettings && !disabledControls && !isDisconnected && isAvailableExt && this.turnOffViewerMode()}> @@ -226,4 +229,4 @@ class MainPage extends Component { } } -export default withTranslation()(inject("storeAppOptions", "storeToolbarSettings", "users")(observer(MainPage))); \ No newline at end of file +export default withTranslation()(inject("storeAppOptions", "storeToolbarSettings", "users", "storeDocumentInfo")(observer(MainPage))); \ No newline at end of file