From 14c84f5ec249cfbec17f9d2d82c1a688b973ae2b Mon Sep 17 00:00:00 2001 From: Simon Eklundh Date: Mon, 15 Jun 2026 16:41:57 +0200 Subject: [PATCH] merge develop and add filter to fetchFavoritesByType callback --- components/home/Favorites.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/home/Favorites.tsx b/components/home/Favorites.tsx index 2be55074..9c876c05 100644 --- a/components/home/Favorites.tsx +++ b/components/home/Favorites.tsx @@ -91,7 +91,10 @@ export const Favorites = ({ [api, user, filter], ); - // Reset empty state when component mounts or dependencies change + // Reset empty state when the account or active view changes. `filter` + // matters because switching the favorites/watchlist toggle swaps this + // component's props in place (no remount), so stale per-type emptiness + // from the previous view must be cleared until the new queries resolve. useEffect(() => { setEmptyState({ Series: false, @@ -101,7 +104,7 @@ export const Favorites = ({ BoxSet: false, Playlist: false, }); - }, [api, user]); + }, [api, user, filter]); // Check if all categories that have been loaded are empty const areAllEmpty = () => {