From 17a591cd3cbc32bc34a6778cb38f762750f21adf Mon Sep 17 00:00:00 2001 From: Gauvain Date: Wed, 1 Jul 2026 22:11:53 +0200 Subject: [PATCH] fix(watchlist): refresh see-all grid after toggling watchlist The see-all screen keeps its own infinite query keyed ["favorites", "see-all", type, filter]. The watchlist mutation only invalidated ["item", id] and ["home", "watchlist"], so removing an item from within the see-all grid left it visible until a manual refresh. Invalidate the ["favorites", "see-all"] prefix in onSettled as well. --- hooks/useWatchlist.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hooks/useWatchlist.ts b/hooks/useWatchlist.ts index eeff81d7..27561c91 100644 --- a/hooks/useWatchlist.ts +++ b/hooks/useWatchlist.ts @@ -134,6 +134,10 @@ export const useWatchlist = (item: BaseItemDto) => { onSettled: () => { queryClient.invalidateQueries({ queryKey: itemQueryKeyPrefix }); queryClient.invalidateQueries({ queryKey: ["home", "watchlist"] }); + // The favorites/watchlist "see all" grid keeps its own infinite query + // (["favorites", "see-all", ...]); invalidate it so removing an item + // from within the see-all screen updates the list in place. + queryClient.invalidateQueries({ queryKey: ["favorites", "see-all"] }); }, });