enhance: collapse childless deleted comments (#1786)

This commit is contained in:
soxa 2025-01-01 20:07:32 +01:00 committed by GitHub
parent ba2ac2c94e
commit 0ca9596310
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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)