[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 = 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,

View file

@ -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) {