One more logic for comment collapsing

This commit is contained in:
Lim Chee Aun 2023-02-10 17:35:38 +08:00
parent 96f61e6e3f
commit 541d318fdc

View file

@ -796,7 +796,8 @@ function SubComments({ hasManyStatuses, replies, instance, hasParentThread }) {
.filter((a, i, arr) => arr.findIndex((b) => b.id === a.id) === i) .filter((a, i, arr) => arr.findIndex((b) => b.id === a.id) === i)
.slice(0, 3); .slice(0, 3);
const open = !hasParentThread && (isBrief || !hasManyStatuses); const open =
(!hasParentThread || replies.length === 1) && (isBrief || !hasManyStatuses);
return ( return (
<details class="replies" open={open}> <details class="replies" open={open}>