diff --git a/src/entities/Font/ui/FontVirtualList/FontVirtualList.svelte b/src/entities/Font/ui/FontVirtualList/FontVirtualList.svelte index f615c6e..d9761bd 100644 --- a/src/entities/Font/ui/FontVirtualList/FontVirtualList.svelte +++ b/src/entities/Font/ui/FontVirtualList/FontVirtualList.svelte @@ -3,7 +3,7 @@ - Renders a virtualized list of fonts - Handles font registration with the manager --> - @@ -99,10 +116,11 @@ function handleNearBottom(lastVisibleIndex: number) { {:else} {#snippet children(scope)} {@render children(scope)} diff --git a/src/widgets/SampleList/ui/SampleList/SampleList.svelte b/src/widgets/SampleList/ui/SampleList/SampleList.svelte index 7c2d4d4..7b36ccf 100644 --- a/src/widgets/SampleList/ui/SampleList/SampleList.svelte +++ b/src/widgets/SampleList/ui/SampleList/SampleList.svelte @@ -24,38 +24,6 @@ let innerHeight = $state(0); // Is the component above the middle of the viewport? let isAboveMiddle = $state(false); -const isLoading = $derived( - unifiedFontStore.isFetching || unifiedFontStore.isLoading, -); - -/** - * Load more fonts by moving to the next page - */ -function loadMore() { - if ( - !unifiedFontStore.pagination.hasMore - || unifiedFontStore.isFetching - ) { - return; - } - unifiedFontStore.nextPage(); -} - -/** - * Handle scroll near bottom - auto-load next page - * - * Triggered by VirtualList when the user scrolls within 5 items of the end - * of the loaded items. Only fetches if there are more pages available. - */ -function handleNearBottom(_lastVisibleIndex: number) { - const { hasMore } = unifiedFontStore.pagination; - - // VirtualList already checks if we're near the bottom of loaded items - if (hasMore && !unifiedFontStore.isFetching) { - loadMore(); - } -} - /** * Calculate display range for pagination info */ @@ -83,13 +51,9 @@ const checkPosition = throttle(() => {
{#snippet children({ item: font,