mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
Slightly rewritten collapsing logic
Let's see if this works better
This commit is contained in:
parent
437c50eeb5
commit
02d26b8da2
1 changed files with 11 additions and 4 deletions
|
@ -1025,10 +1025,17 @@ function SubComments({
|
|||
.filter((a, i, arr) => arr.findIndex((b) => b.id === a.id) === i)
|
||||
.slice(0, 3);
|
||||
|
||||
const open =
|
||||
!previousOpen &&
|
||||
(!hasParentThread || replies.length === 1) &&
|
||||
(isBrief || !hasManyStatuses);
|
||||
let open = false;
|
||||
// const open =
|
||||
// !previousOpen &&
|
||||
// (!hasParentThread || totalComments === 1) &&
|
||||
// (isBrief || !hasManyStatuses);
|
||||
if (hasParentThread) {
|
||||
open = totalComments === 1;
|
||||
} else {
|
||||
open = isBrief;
|
||||
}
|
||||
if (!previousOpen && !open) open = true;
|
||||
const openBefore = cachedRepliesToggle[replies[0].id];
|
||||
|
||||
const handleMediaClick = useCallback((e, i, media, status) => {
|
||||
|
|
Loading…
Reference in a new issue