From b4906376ff78ff18086735ee130ab311e35e2090 Mon Sep 17 00:00:00 2001 From: Jaume Pujantell Date: Fri, 30 Aug 2024 09:41:43 +0200 Subject: [PATCH] show thread options only on root comment Signed-off-by: Jaume Pujantell Change-Id: Ifb97d0d41ed33ce2b0edb4cd84dc0301d42a8302 --- browser/src/canvas/sections/CommentListSection.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/src/canvas/sections/CommentListSection.ts b/browser/src/canvas/sections/CommentListSection.ts index 3f6234ce7520..35cb0eeb3dea 100644 --- a/browser/src/canvas/sections/CommentListSection.ts +++ b/browser/src/canvas/sections/CommentListSection.ts @@ -999,7 +999,7 @@ export class CommentSection extends app.definitions.canvasSectionObject { this.remove.call(this, options.$trigger[0].annotation.sectionProperties.data.id); }.bind(this) }, - removeThread: docLayer._docType !== 'text' || $trigger[0].isRoot === true ? undefined : { + removeThread: docLayer._docType !== 'text' || !$trigger[0].annotation.isRootComment() ? undefined : { name: _('Remove Thread'), callback: function (key: any, options: any) { this.removeThread.call(this, options.$trigger[0].annotation.sectionProperties.data.id); @@ -1011,7 +1011,7 @@ export class CommentSection extends app.definitions.canvasSectionObject { this.resolve.call(this, options.$trigger[0].annotation); }.bind(this) }, - resolveThread: docLayer._docType !== 'text' || $trigger[0].isRoot === true ? undefined : { + resolveThread: docLayer._docType !== 'text' || !$trigger[0].annotation.isRootComment() ? undefined : { name: this.isThreadResolved($trigger[0].annotation) ? _('Unresolve Thread') : _('Resolve Thread'), callback: function (key: any, options: any) { this.resolveThread.call(this, options.$trigger[0].annotation);