From 24f9c38098ef172485f3f506328251f8de7f59ff Mon Sep 17 00:00:00 2001 From: Gauvain Date: Wed, 10 Jun 2026 22:30:20 +0200 Subject: [PATCH] fix(downloads): key the series poster cache read on SeriesId The cached base64 poster was read in a useMemo with empty deps, so recycled list cells kept showing the first-rendered series poster. --- components/downloads/SeriesCard.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/downloads/SeriesCard.tsx b/components/downloads/SeriesCard.tsx index 60ae71be..09b13d27 100644 --- a/components/downloads/SeriesCard.tsx +++ b/components/downloads/SeriesCard.tsx @@ -16,9 +16,12 @@ export const SeriesCard: React.FC<{ items: BaseItemDto[] }> = ({ items }) => { const { showActionSheetWithOptions } = useActionSheet(); const router = useRouter(); + // Keyed on SeriesId so recycled FlashList cells re-read the correct poster + // instead of freezing the first-rendered series' image (empty deps bug). const base64Image = useMemo(() => { - return storage.getString(items[0].SeriesId!); - }, []); + const seriesId = items[0]?.SeriesId; + return seriesId ? storage.getString(seriesId) : undefined; + }, [items[0]?.SeriesId]); const deleteSeries = useCallback( async () =>