feat: lazy load feed list; remove virtuoso overscan

This commit is contained in:
DIYgod 2024-06-25 20:47:37 +08:00
parent b8abf065ea
commit 1d2d58da88
No known key found for this signature in database
3 changed files with 8 additions and 7 deletions

View File

@ -120,7 +120,6 @@ export function EntryColumn() {
)
}, [isFetchingNextPage]),
},
overscan: window.innerHeight,
rangeChanged: handleRangeChange,
totalCount: entries.totalCount,
endReached: () => entries.hasNextPage && entries.fetchNextPage(),

View File

@ -161,12 +161,14 @@ export function FeedColumn() {
{views.map((item, index) => (
<section
key={item.name}
className="shrink-0 snap-center overflow-y-auto"
className="min-h-full w-64 shrink-0 snap-center overflow-y-auto"
>
<FeedList
className="flex min-h-full w-64 flex-col px-3 pb-6 text-sm"
view={index}
/>
{active === index && (
<FeedList
className="flex w-full flex-col px-3 pb-6 text-sm"
view={index}
/>
)}
</section>
))}
</m.div>

View File

@ -59,7 +59,7 @@ export function SettingModalLayout(props: PropsWithChildren) {
>
{draggable && <div className="absolute inset-x-0 top-0 z-[1] h-8" onPointerDown={handleDrag} />}
<div className="flex h-0 flex-1 bg-theme-tooltip-background">
<div className="w-44 border-r px-2 py-5">
<div className="w-44 border-r px-2 py-6">
<div className="mb-4 flex h-8 items-center gap-2 px-4 font-bold">
<Logo className="size-6" />
{APP_NAME}