Skip to content

Commit

Permalink
show thread options only on root comment
Browse files Browse the repository at this point in the history
Signed-off-by: Jaume Pujantell <[email protected]>
Change-Id: Ifb97d0d41ed33ce2b0edb4cd84dc0301d42a8302
  • Loading branch information
Jaume Pujantell authored and JaumePujantell committed Aug 30, 2024
1 parent ce60068 commit b490637
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions browser/src/canvas/sections/CommentListSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit b490637

Please sign in to comment.