From 9dbee39d3488fbfbd8d9a46d13dba5365aaaaab9 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sun, 7 Dec 2025 03:14:38 -0800 Subject: [PATCH] fix fetch confirmation to only show on list query --- .../player/context/player-context.tsx | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/renderer/features/player/context/player-context.tsx b/src/renderer/features/player/context/player-context.tsx index f7b1f921c..4ccaa7d9f 100644 --- a/src/renderer/features/player/context/player-context.tsx +++ b/src/renderer/features/player/context/player-context.tsx @@ -46,7 +46,6 @@ export interface PlayerContext { id: string[], itemType: LibraryItem, type: AddToQueueType, - skipConfirmation?: boolean, ) => void; addToQueueByListQuery: ( serverId: string, @@ -236,20 +235,7 @@ export const PlayerProvider = ({ children }: { children: React.ReactNode }) => { ); const addToQueueByFetch = useCallback( - async ( - serverId: string, - id: string[], - itemType: LibraryItem, - type: AddToQueueType, - skipConfirmation?: boolean, - ) => { - if (!skipConfirmation) { - const confirmed = await confirmLargeFetch(); - if (!confirmed) { - return; - } - } - + async (serverId: string, id: string[], itemType: LibraryItem, type: AddToQueueType) => { let toastId: null | string = null; const fetchId = nanoid(); @@ -331,7 +317,7 @@ export const PlayerProvider = ({ children }: { children: React.ReactNode }) => { }); } }, - [confirmLargeFetch, queryClient, storeActions, t], + [queryClient, storeActions, t], ); const addToQueueByListQuery = useCallback( @@ -482,7 +468,7 @@ export const PlayerProvider = ({ children }: { children: React.ReactNode }) => { if (itemType === LibraryItem.SONG) { addToQueueByData(allResults as Song[], type); } else { - await addToQueueByFetch(serverId, allResults as string[], itemType, type, true); + await addToQueueByFetch(serverId, allResults as string[], itemType, type); } } catch (err: any) { if (instanceOfCancellationError(err)) {