From 0de87589961d9c70cbbdafc8042b5d261920ba61 Mon Sep 17 00:00:00 2001 From: Xylight <80978739+Xyphyn@users.noreply.github.com> Date: Mon, 16 Jun 2025 12:10:32 -0700 Subject: [PATCH] fix: virtualizer initialOffset causes missing items on shift (#582) --- .../comment/CommentListVirtualizer.svelte | 72 +++++++++---------- .../lemmy/community/CommunityHeader.svelte | 2 +- .../lemmy/post/feed/VirtualFeed.svelte | 21 +++++- src/lib/components/ui/EntityHeader.svelte | 5 +- 4 files changed, 56 insertions(+), 44 deletions(-) diff --git a/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte b/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte index d6ec30de..99052bef 100644 --- a/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte +++ b/src/lib/components/lemmy/comment/CommentListVirtualizer.svelte @@ -1,27 +1,14 @@
- - {#snippet item(index)} -
- [nodes[index]], v => (nodes[index] = v[0])} - {post} - /> -
- {/snippet} -
+ {#if offsetEl} + + {#snippet item(index)} +
+ [nodes[index]], v => (nodes[index] = v[0])} + {post} + /> +
+ {/snippet} +
+ {/if}
diff --git a/src/lib/components/lemmy/community/CommunityHeader.svelte b/src/lib/components/lemmy/community/CommunityHeader.svelte index 3d0fd23b..f050d708 100644 --- a/src/lib/components/lemmy/community/CommunityHeader.svelte +++ b/src/lib/components/lemmy/community/CommunityHeader.svelte @@ -79,7 +79,7 @@ ] : []} bio={community.description} - class={clazz} + class={['tracking-normal', clazz]} > {#snippet nameDetail()}