mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 13:40:24 +02:00
handle more rating/favorite mutation cases
This commit is contained in:
@@ -77,12 +77,25 @@ export const useSetRating = (args: MutationHookArgs) => {
|
||||
|
||||
break;
|
||||
}
|
||||
case LibraryItem.PLAYLIST_SONG:
|
||||
case LibraryItem.QUEUE_SONG:
|
||||
case LibraryItem.SONG: {
|
||||
const queryKey = queryKeys.songs.detail(variables.apiClientProps.serverId);
|
||||
const songDetailQueryKey = queryKeys.songs.detail(
|
||||
variables.apiClientProps.serverId,
|
||||
);
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
exact: false,
|
||||
queryKey,
|
||||
queryKey: songDetailQueryKey,
|
||||
});
|
||||
|
||||
const albumDetailQueryKey = queryKeys.albums.detail(
|
||||
variables.apiClientProps.serverId,
|
||||
);
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
exact: false,
|
||||
queryKey: albumDetailQueryKey,
|
||||
});
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user