mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-03 19:12:50 +01:00
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.
This commit is contained in:
@@ -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"] });
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user