diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index 7fc345026..55d9a621f 100644 --- a/apps/common/mobile/lib/view/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/view/collaboration/Comments.jsx @@ -637,6 +637,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o const isAndroid = Device.android; const displayMode = storeReview.displayMode; const isViewer = storeAppOptions.isViewer; + const canEditComments = storeAppOptions.canEditComments; const viewMode = !storeAppOptions.canComments; const comments = storeComments.groupCollectionFilter || storeComments.collectionComments; const isEdit = storeAppOptions.isEdit || storeAppOptions.isRestrictedEdit; @@ -677,8 +678,8 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o {isEdit && !viewMode &&
- {(comment.editable && displayMode === 'markup' && !wsProps?.Objects && !isViewer) &&
{onResolveComment(comment);}}>
} - {(displayMode === 'markup' && !wsProps?.Objects && !isViewer) && + {(comment.editable && displayMode === 'markup' && !wsProps?.Objects && (!isViewer || canEditComments)) &&
{onResolveComment(comment);}}>
} + {(displayMode === 'markup' && !wsProps?.Objects && (!isViewer || canEditComments)) &&
{setComment(comment); openActionComment(true);}}> @@ -708,7 +709,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o
{reply.date}
- {isEdit && !viewMode && reply.editable && !isViewer && + {isEdit && !viewMode && reply.editable && (!isViewer || canEditComments) &&
{setComment(comment); setReply(reply); openActionReply(true);}} @@ -748,6 +749,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob const isAndroid = Device.android; const displayMode = storeReview.displayMode; const isViewer = storeAppOptions.isViewer; + const canEditComments = storeAppOptions.canEditComments; const viewMode = !storeAppOptions.canComments; const isEdit = storeAppOptions.isEdit || storeAppOptions.isRestrictedEdit; const comments = storeComments.showComments; @@ -787,7 +789,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob {isEdit && !viewMode && - {onCommentMenuClick('addReply', comment);}}>{_t.textAddReply} + {onCommentMenuClick('addReply', comment);}}>{_t.textAddReply} }
@@ -808,8 +810,8 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
{isEdit && !viewMode &&
- {(comment.editable && displayMode === 'markup' && !wsProps?.Objects && !isViewer) &&
{onResolveComment(comment);}}>
} - {(displayMode === 'markup' && !wsProps?.Objects && !isViewer) && + {(comment.editable && displayMode === 'markup' && !wsProps?.Objects && (!isViewer || canEditComments)) &&
{onResolveComment(comment);}}>
} + {(displayMode === 'markup' && !wsProps?.Objects && (!isViewer || canEditComments)) &&
{openActionComment(true);}}> @@ -839,7 +841,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
{reply.date}
- {isEdit && !viewMode && reply.editable && !isViewer && + {isEdit && !viewMode && reply.editable && (!isViewer || canEditComments) &&
{setReply(reply); openActionReply(true);}}