Files
streamyfin/components
Gauvain 0cac1f8779 fix(favorites): sync empty-state on cache hits to avoid blank view
Switching Favorites<->Watchlist (props swap in place, no remount) left the
page blank with only the tab buttons: the empty-state was written as a side
effect inside the queryFn, which React Query skips on cache hits, and a reset
effect then cleared it — so on a cache-served switch nothing repopulated it,
every list was hidden by hideIfEmpty, and the empty message never rendered.

Each list now reports emptiness once its query settles (incl. cache hits) via
a new optional onEmptyStateChange callback on InfiniteScrollingCollectionList
(mobile + TV), reporting null while loading so a switch never flashes a stale
state. The parent derives the aggregate empty-state from that (null = not
settled yet, so the message stays hidden during a switch).

The reset effect is removed entirely, not kept: React runs child effects
before parent effects within a commit, so a parent reset setEmptyState(false)
would clobber the children's reported values on the same render. Dropping it
and using the per-list callbacks (tri-state null/true/false) is what makes the
switch — including a cache-served one — resolve to the correct state. Applies
to both mobile and TV Favorites.
2026-07-01 23:13:21 +02:00
..
wip
2026-01-19 08:21:55 +01:00
2025-08-07 10:12:40 +02:00
2026-01-18 13:20:17 +01:00
2026-06-11 10:24:11 +02:00
WIP
2025-01-30 09:20:31 +01:00
2026-01-31 10:52:21 +01:00
2024-07-31 23:19:47 +02:00
wip
2026-01-19 08:21:55 +01:00