enhance: collapse childless deleted comments (#1786)
This commit is contained in:
parent
ba2ac2c94e
commit
0ca9596310
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue