diff --git a/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx b/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx index c347f4353..f57aebe28 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/ContextMenu.jsx @@ -214,7 +214,7 @@ class ContextMenu extends ContextMenuController { if (isEdit && EditorUIController.ContextMenu) { return EditorUIController.ContextMenu.mapMenuItems(this); } else { - const {canViewComments, canCoAuthoring, canComments } = this.props; + const {canViewComments} = this.props; const api = Common.EditorApi.get(); const cellinfo = api.asc_getCellInfo(); @@ -238,32 +238,25 @@ class ContextMenu extends ContextMenuController { case Asc.c_oAscSelectionType.RangeShapeText: istextshapemenu = true; break; } - itemsIcon.push({ - event: 'copy', - icon: 'icon-copy' - }); - - if (iscellmenu && cellinfo.asc_getHyperlink()) { - itemsText.push({ - caption: _t.menuOpenLink, - event: 'openlink' + itemsIcon.push({ + event: 'copy', + icon: 'icon-copy' }); - } - if(!isDisconnected) { - if (canViewComments && hasComments && hasComments.length>0) { - itemsText.push({ - caption: _t.menuViewComment, - event: 'viewcomment' - }); - } - if (iscellmenu && !api.isCellEdited && canCoAuthoring && canComments && hasComments && hasComments.length<1) { + if (iscellmenu && cellinfo.asc_getHyperlink()) { itemsText.push({ - caption: _t.menuAddComment, - event: 'addcomment' + caption: _t.menuOpenLink, + event: 'openlink' }); } - } + if(!isDisconnected) { + if (canViewComments && hasComments && hasComments.length>0) { + itemsText.push({ + caption: _t.menuViewComment, + event: 'viewcomment' + }); + } + } return itemsIcon.concat(itemsText); } diff --git a/apps/spreadsheeteditor/mobile/src/store/appOptions.js b/apps/spreadsheeteditor/mobile/src/store/appOptions.js index d21a85617..7f8078ef7 100644 --- a/apps/spreadsheeteditor/mobile/src/store/appOptions.js +++ b/apps/spreadsheeteditor/mobile/src/store/appOptions.js @@ -90,7 +90,7 @@ export class storeAppOptions { this.canEdit = permissions.edit !== false && // can edit or review (this.config.canRequestEditRights || this.config.mode !== 'view') && isSupportEditFeature; // if mode=="view" -> canRequestEditRights must be defined // (!this.isReviewOnly || this.canLicense) && // if isReviewOnly==true -> canLicense must be true - this.isEdit = (this.canLicense || this.isEditDiagram || this.isEditMailMerge) && permissions.edit !== false && this.config.mode !== 'view' && true; + this.isEdit = (this.canLicense || this.isEditDiagram || this.isEditMailMerge) && permissions.edit !== false && this.config.mode !== 'view' && isSupportEditFeature && true; this.canComments = this.canLicense && (permissions.comment === undefined ? this.isEdit : permissions.comment) && (this.config.mode !== 'view'); this.canComments = this.canComments && !((typeof (this.customization) == 'object') && this.customization.comments===false); this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false);