wishlist modal bug fix
This commit is contained in:
parent
abbb93f053
commit
eaa27038d9
1 changed files with 29 additions and 28 deletions
|
|
@ -2505,7 +2505,9 @@ async function rehydrateModal(processInfo, userRequested = false) {
|
||||||
|
|
||||||
console.log(`✅ [Rehydrate] Successfully updated existing wishlist modal for auto-process`);
|
console.log(`✅ [Rehydrate] Successfully updated existing wishlist modal for auto-process`);
|
||||||
} else {
|
} else {
|
||||||
console.log(`💧 [Rehydrate] Creating new wishlist modal for active process: ${batch_id}`);
|
// Only create modal if user requested it - don't create for background auto-processing
|
||||||
|
if (userRequested) {
|
||||||
|
console.log(`💧 [Rehydrate] User requested - creating wishlist modal for active process: ${batch_id}`);
|
||||||
|
|
||||||
// Create the modal with current server state
|
// Create the modal with current server state
|
||||||
await openDownloadMissingWishlistModal();
|
await openDownloadMissingWishlistModal();
|
||||||
|
|
@ -2529,16 +2531,15 @@ async function rehydrateModal(processInfo, userRequested = false) {
|
||||||
// Start polling for live updates
|
// Start polling for live updates
|
||||||
startModalDownloadPolling(playlist_id);
|
startModalDownloadPolling(playlist_id);
|
||||||
|
|
||||||
// SIMPLIFIED VISIBILITY LOGIC: Show modal if user requested it, otherwise keep hidden for background sync
|
// Show modal
|
||||||
if (userRequested) {
|
|
||||||
console.log('👤 [Rehydrate] User requested - showing wishlist modal');
|
console.log('👤 [Rehydrate] User requested - showing wishlist modal');
|
||||||
process.modalElement.style.display = 'flex';
|
process.modalElement.style.display = 'flex';
|
||||||
WishlistModalState.setVisible();
|
WishlistModalState.setVisible();
|
||||||
WishlistModalState.clearUserClosed();
|
WishlistModalState.clearUserClosed();
|
||||||
} else {
|
} else {
|
||||||
console.log('🔄 [Rehydrate] Background sync - keeping modal hidden until user interaction');
|
console.log('🔄 [Rehydrate] Background auto-processing detected - NOT creating modal (user must click wishlist button to see progress)');
|
||||||
process.modalElement.style.display = 'none';
|
// Don't create modal for background auto-processing
|
||||||
WishlistModalState.setHidden();
|
// User must click the wishlist button to see the modal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue