From b8eaa9400740a06b93dadabf7c030e2bbc4c9cb0 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Fri, 2 Jun 2023 17:07:54 +0300 Subject: [PATCH] [DE mobile] For Bug 54296 --- apps/documenteditor/mobile/src/controller/Main.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 76e5a22c19..193946f984 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -623,8 +623,13 @@ class MainController extends Component { this.api.asc_registerCallback('asc_onShowContentControlsActions', (obj, x, y) => { const storeAppOptions = this.props.storeAppOptions; + const storeDocumentInfo = this.props.storeDocumentInfo; + const isViewer = storeAppOptions.isViewer; + const dataDoc = storeDocumentInfo.dataDoc; + const docExt = dataDoc.fileType; + const isAvailableExt = docExt && docExt !== 'djvu' && docExt !== 'pdf' && docExt !== 'xps' && docExt !== 'oform'; - if (!storeAppOptions.isEdit && !(storeAppOptions.isRestrictedEdit && storeAppOptions.canFillForms) || this.props.users.isDisconnected) return; + if (!storeAppOptions.isEdit && !(storeAppOptions.isRestrictedEdit && storeAppOptions.canFillForms) || this.props.users.isDisconnected || (isViewer && isAvailableExt)) return; switch (obj.type) { case Asc.c_oAscContentControlSpecificType.DateTime: