mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2026-04-25 22:49:36 -05:00
refresh user playlists to update track counts
add docs to query keys
This commit is contained in:
@@ -67,6 +67,10 @@ export default function TrackOptions({
|
||||
|
||||
trigger("notificationSuccess");
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [QueryKeys.UserPlaylists]
|
||||
});
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [QueryKeys.ItemTracks, playlist.Id!],
|
||||
});
|
||||
|
||||
@@ -27,7 +27,24 @@ export enum QueryKeys {
|
||||
ArtistImage = "ArtistImage",
|
||||
PlaybackStateChange = "PlaybackStateChange",
|
||||
Player = "Player",
|
||||
|
||||
/**
|
||||
* Query representing the fetching of a user's created playlist.
|
||||
*
|
||||
* This differs from "Favorite Playlists", which are playlists
|
||||
* that exist on the server not created by the user that the user
|
||||
* has favorited
|
||||
*
|
||||
* Invalidation occurs by providing this query key
|
||||
*/
|
||||
UserPlaylists = "UserPlaylists",
|
||||
|
||||
/**
|
||||
* Query representing the fetching of tracks for an album or playlist.
|
||||
*
|
||||
* Invalidation occurs when the ID of the album or playlist is provided
|
||||
* as a query key
|
||||
*/
|
||||
ItemTracks = "ItemTracks",
|
||||
RefreshHome = "RefreshHome",
|
||||
FavoriteArtists = "FavoriteArtists",
|
||||
|
||||
Reference in New Issue
Block a user