From 91eb84b1a5a25733637d517d9c8d9085611711f8 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 5 Sep 2022 16:33:12 +0300 Subject: [PATCH] [DE mobile] Fix Bug 58673 --- apps/documenteditor/mobile/src/page/main.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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