mirror of
https://github.com/jeffvli/feishin.git
synced 2026-08-08 13:23:16 +02:00
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:
@@ -149,6 +149,8 @@ export const ShuffleAllContextModal = () => {
|
|||||||
if (playbackKind === 'albums') {
|
if (playbackKind === 'albums') {
|
||||||
const { data } = await refetchAlbums();
|
const { data } = await refetchAlbums();
|
||||||
|
|
||||||
|
closeAllModals();
|
||||||
|
|
||||||
addToQueueByFetch(
|
addToQueueByFetch(
|
||||||
server.id,
|
server.id,
|
||||||
data?.items.map((a) => a.id) ?? [],
|
data?.items.map((a) => a.id) ?? [],
|
||||||
@@ -158,10 +160,10 @@ export const ShuffleAllContextModal = () => {
|
|||||||
} else {
|
} else {
|
||||||
const { data } = await refetchSongs();
|
const { data } = await refetchSongs();
|
||||||
|
|
||||||
|
closeAllModals();
|
||||||
|
|
||||||
addToQueueByData(data?.items || [], playType);
|
addToQueueByData(data?.items || [], playType);
|
||||||
}
|
}
|
||||||
|
|
||||||
closeAllModals();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user