From 4660a3ddcd598224ef6caa05be96015bb28a84e2 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Sat, 27 Mar 2021 16:32:27 +0300 Subject: [PATCH] [PE mobile] Fix context menu --- apps/presentationeditor/mobile/src/controller/ContextMenu.jsx | 4 ++-- apps/presentationeditor/mobile/src/store/appOptions.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx b/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx index 6e4c92d74..0db776dcc 100644 --- a/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/presentationeditor/mobile/src/controller/ContextMenu.jsx @@ -157,7 +157,7 @@ class ContextMenu extends ContextMenuController { const { t } = this.props; const _t = t("ContextMenu", { returnObjects: true }); - const { isEdit, canViewComments, canReview, isDisconnected } = this.props; + const { isEdit, canViewComments, isDisconnected } = this.props; const api = Common.EditorApi.get(); const stack = api.getSelectedElements(); @@ -264,7 +264,7 @@ class ContextMenu extends ContextMenuController { }); } - var hideAddComment = (isText && isChart) || api.can_AddQuotedComment() === false || !canViewComments; + const hideAddComment = (isText && isChart) || api.can_AddQuotedComment() === false || !canViewComments; if (!hideAddComment) { itemsText.push({ caption: _t.menuAddComment, diff --git a/apps/presentationeditor/mobile/src/store/appOptions.js b/apps/presentationeditor/mobile/src/store/appOptions.js index 166ea204f..c68baecff 100644 --- a/apps/presentationeditor/mobile/src/store/appOptions.js +++ b/apps/presentationeditor/mobile/src/store/appOptions.js @@ -4,12 +4,14 @@ export class storeAppOptions { constructor() { makeObservable(this, { isEdit: observable, + canViewComments: observable, setConfigOptions: action, setPermissionOptions: action }); } isEdit = false; + canViewComments = false; config = {}; setConfigOptions (config) {