From ed7d31bf5cea23066a2af47d9966d9ff2c2bdf91 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Wed, 8 Apr 2026 10:00:30 +0300 Subject: [PATCH] refactor: migrate all callers from unifiedFontStore to fontStore --- .../ui/FontVirtualList/FontVirtualList.svelte | 20 +++++++++---------- .../ui/FiltersControl/FilterControls.svelte | 4 ++-- .../model/stores/comparisonStore.svelte.ts | 4 ++-- .../ui/FontSearch/FontSearch.svelte | 4 ++-- .../SampleListSection.svelte | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/entities/Font/ui/FontVirtualList/FontVirtualList.svelte b/src/entities/Font/ui/FontVirtualList/FontVirtualList.svelte index 9277a38..9e41143 100644 --- a/src/entities/Font/ui/FontVirtualList/FontVirtualList.svelte +++ b/src/entities/Font/ui/FontVirtualList/FontVirtualList.svelte @@ -18,7 +18,7 @@ import { type FontLoadRequestConfig, type UnifiedFont, appliedFontsManager, - unifiedFontStore, + fontStore, } from '../../model'; interface Props extends @@ -50,7 +50,7 @@ let { }: Props = $props(); const isLoading = $derived( - unifiedFontStore.isFetching || unifiedFontStore.isLoading, + fontStore.isFetching || fontStore.isLoading, ); function handleInternalVisibleChange(visibleItems: UnifiedFont[]) { @@ -82,12 +82,12 @@ function handleInternalVisibleChange(visibleItems: UnifiedFont[]) { */ function loadMore() { if ( - !unifiedFontStore.pagination.hasMore - || unifiedFontStore.isFetching + !fontStore.pagination.hasMore + || fontStore.isFetching ) { return; } - unifiedFontStore.nextPage(); + fontStore.nextPage(); } /** @@ -97,17 +97,17 @@ function loadMore() { * of the loaded items. Only fetches if there are more pages available. */ function handleNearBottom(_lastVisibleIndex: number) { - const { hasMore } = unifiedFontStore.pagination; + const { hasMore } = fontStore.pagination; // VirtualList already checks if we're near the bottom of loaded items - if (hasMore && !unifiedFontStore.isFetching) { + if (hasMore && !fontStore.isFetching) { loadMore(); } }
- {#if skeleton && isLoading && unifiedFontStore.fonts.length === 0} + {#if skeleton && isLoading && fontStore.fonts.length === 0}
{@render skeleton()} @@ -115,8 +115,8 @@ function handleNearBottom(_lastVisibleIndex: number) { {:else}