[PE mobile] Fix context menu

This commit is contained in:
JuliaSvinareva 2021-03-27 16:32:27 +03:00
parent 465fd40004
commit 4660a3ddcd
2 changed files with 4 additions and 2 deletions

View file

@ -157,7 +157,7 @@ class ContextMenu extends ContextMenuController {
const { t } = this.props; const { t } = this.props;
const _t = t("ContextMenu", { returnObjects: true }); 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 api = Common.EditorApi.get();
const stack = api.getSelectedElements(); 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) { if (!hideAddComment) {
itemsText.push({ itemsText.push({
caption: _t.menuAddComment, caption: _t.menuAddComment,

View file

@ -4,12 +4,14 @@ export class storeAppOptions {
constructor() { constructor() {
makeObservable(this, { makeObservable(this, {
isEdit: observable, isEdit: observable,
canViewComments: observable,
setConfigOptions: action, setConfigOptions: action,
setPermissionOptions: action setPermissionOptions: action
}); });
} }
isEdit = false; isEdit = false;
canViewComments = false;
config = {}; config = {};
setConfigOptions (config) { setConfigOptions (config) {