chore: incorporate renewed appliderFontStore and comparisonStore logic

This commit is contained in:
Ilia Mashkov
2026-02-02 12:20:19 +03:00
parent 2cd38797b9
commit 6f0b69ff45

View File

@@ -10,6 +10,7 @@ import {
unifiedFontStore,
} from '$entities/Font';
import { FontSampler } from '$features/DisplayFont';
import { controlManager } from '$features/SetupFont';
let text = $state('The quick brown fox jumps over the lazy dog...');
@@ -17,7 +18,10 @@ let text = $state('The quick brown fox jumps over the lazy dog...');
* Load more fonts by moving to the next page
*/
function loadMore() {
if (!unifiedFontStore.pagination.hasMore || unifiedFontStore.isFetching) {
if (
!unifiedFontStore.pagination.hasMore
|| unifiedFontStore.isFetching
) {
return;
}
unifiedFontStore.nextPage();
@@ -57,10 +61,12 @@ const displayRange = $derived.by(() => {
total={unifiedFontStore.pagination.total}
onNearBottom={handleNearBottom}
itemHeight={280}
useWindowScroll={true}
weight={controlManager.weight}
>
{#snippet children({ item: font, isVisible, proximity, index })}
<FontListItem {font} {isVisible} {proximity}>
<FontSampler font={font} bind:text index={index} />
{#snippet children({ item: font, isFullyVisible, isPartiallyVisible, proximity, index })}
<FontListItem {font} {isFullyVisible} {isPartiallyVisible} {proximity}>
<FontSampler {font} bind:text {index} />
</FontListItem>
{/snippet}
</FontVirtualList>