Skip to content

Hide deleted comments without children (fixes #3735)#3736

Merged
dessalines merged 2 commits intomainfrom
hide-deleted
Jan 7, 2026
Merged

Hide deleted comments without children (fixes #3735)#3736
dessalines merged 2 commits intomainfrom
hide-deleted

Conversation

@Nutomic
Copy link
Copy Markdown
Member

@Nutomic Nutomic commented Jan 5, 2026

Before:
Screenshot_20260105_114835

After (without login):
Screenshot_20260105_114844

} = this.commentView;

// Hide deleted comment, unless it has children or was created by me.
const is_my_comment =
Copy link
Copy Markdown
Member

@dessalines dessalines Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already a get myComment function you can use.

Don't do an early return either, instead add this as an if condition on the <li element.

const isDeletedAndNoChildren = !myComment && deleted && childCount === 0;
...
(!isDeletedAndNoChildren && <li ...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@dessalines dessalines merged commit f76fcee into main Jan 7, 2026
2 checks passed
@dessalines dessalines deleted the hide-deleted branch January 7, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants