From 8c6ff77fac92f617c6d8e8dbd050f14785c8a68c Mon Sep 17 00:00:00 2001 From: James Xylight Date: Fri, 7 Feb 2025 13:54:03 -0800 Subject: [PATCH] fix: comment expansions --- .../lemmy/comment/CommentListVirtualizer.svelte | 8 +++++++- .../components/lemmy/comment/Comments.svelte | 17 ++++++++++------- .../[id=integer]/CommentProvider.svelte | 5 ++++- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte b/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte index ec04a8e7..d77b39b7 100644 --- a/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte +++ b/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte @@ -71,7 +71,13 @@ data-index={row.index} class="-mx-4 sm:-mx-6 px-4 sm:px-6" > - + [nodes[row.index]], (v) => (nodes[row.index] = v[0]) + } + {post} + /> {/each} diff --git a/src/lib/components/lemmy/comment/Comments.svelte b/src/lib/components/lemmy/comment/Comments.svelte index e9f6075b..eb383034 100644 --- a/src/lib/components/lemmy/comment/Comments.svelte +++ b/src/lib/components/lemmy/comment/Comments.svelte @@ -45,8 +45,9 @@ parent.comment_view.counts.child_count > 0 && parent.children.length == 0 ) - ) + ) { return + } try { parent.loading = true @@ -131,20 +132,22 @@ href="/comment/{page.params.instance}/{node.comment_view.comment.id}" >