Skip to content

Commit 66d9655

Browse files
committed
button-hidden-if-comment-not-resolved
1 parent 07a921d commit 66d9655

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/frontend/apps/impress/src/features/docs/doc-editor/components/comments/CommentToolbarButton.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ export const CommentToolbarButton = () => {
2323
DocsStyleSchema
2424
>();
2525

26+
const hasActiveUnresolvedThread = editor._tiptapEditor.isActive('comment', {
27+
orphan: false,
28+
});
29+
2630
if (
2731
!editor.isEditable ||
2832
!Components ||
29-
!currentDoc?.abilities.comment /* ||
30-
editor._tiptapEditor.isActive('comment') // has already a comment*/
33+
!currentDoc?.abilities.comment ||
34+
hasActiveUnresolvedThread
3135
) {
3236
return null;
3337
}

0 commit comments

Comments
 (0)