fix race condition of modal closure after queue clear confirmation

- if the setting confirmQueueChanges: true, the shuffle all modal queue mutation handler would call closeAllModals  after the queue add, which ended up closing the additional confirmation modal
This commit is contained in:
jeffvli
2026-08-07 21:23:58 -07:00
parent 700cda052f
commit 3053b004e0
@@ -149,6 +149,8 @@ export const ShuffleAllContextModal = () => {
if (playbackKind === 'albums') {
const { data } = await refetchAlbums();
closeAllModals();
addToQueueByFetch(
server.id,
data?.items.map((a) => a.id) ?? [],
@@ -158,10 +160,10 @@ export const ShuffleAllContextModal = () => {
} else {
const { data } = await refetchSongs();
closeAllModals();
addToQueueByData(data?.items || [], playType);
}
closeAllModals();
};
return (