From 0ca959631072ce7408a09d74e4e2e442be610be7 Mon Sep 17 00:00:00 2001 From: soxa <6390896+Soxasora@users.noreply.github.com> Date: Wed, 1 Jan 2025 20:07:32 +0100 Subject: [PATCH] enhance: collapse childless deleted comments (#1786) --- components/comment.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/comment.js b/components/comment.js index 1f273c0d..9322b9de 100644 --- a/components/comment.js +++ b/components/comment.js @@ -100,8 +100,9 @@ export default function Comment ({ const [edit, setEdit] = useState() const { me } = useMe() const isHiddenFreebie = me?.privates?.satsFilter !== 0 && !item.mine && item.freebie && !item.freedFreebie + const isDeletedChildless = item?.ncomments === 0 && item?.deletedAt const [collapse, setCollapse] = useState( - (isHiddenFreebie || item?.user?.meMute || (item?.outlawed && !me?.privates?.wildWestMode)) && !includeParent + (isHiddenFreebie || isDeletedChildless || item?.user?.meMute || (item?.outlawed && !me?.privates?.wildWestMode)) && !includeParent ? 'yep' : 'nope') const ref = useRef(null)