Merge fix/playlist-detail-invalidation: live playlist detail after popover add
This commit is contained in:
commit
47bad6d9ce
1 changed files with 3 additions and 0 deletions
|
|
@ -86,6 +86,9 @@ export default function AddToPlaylist({
|
||||||
function refresh() {
|
function refresh() {
|
||||||
qc.invalidateQueries({ queryKey: ["playlist-membership", videoId] });
|
qc.invalidateQueries({ queryKey: ["playlist-membership", videoId] });
|
||||||
qc.invalidateQueries({ queryKey: ["playlists"] });
|
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) {
|
async function toggle(pl: Playlist) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue