Skip to content

Commit

Permalink
enhance: collapse childless deleted comments (#1786)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soxasora authored Jan 1, 2025
1 parent ba2ac2c commit 0ca9596
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0ca9596

Please sign in to comment.