Merge fix/playlist-detail-invalidation: live playlist detail after popover add
This commit is contained in:
@@ -86,6 +86,9 @@ export default function AddToPlaylist({
|
||||
function refresh() {
|
||||
qc.invalidateQueries({ queryKey: ["playlist-membership", videoId] });
|
||||
qc.invalidateQueries({ queryKey: ["playlists"] });
|
||||
// Also invalidate every open/cached playlist detail (["playlist", id]) so the
|
||||
// Playlists page reflects the add/remove when navigated to, not only after F5.
|
||||
qc.invalidateQueries({ queryKey: ["playlist"] });
|
||||
}
|
||||
|
||||
async function toggle(pl: Playlist) {
|
||||
|
||||
Reference in New Issue
Block a user