{
e.preventDefault();
if (document.body.classList.contains('is-overlay-scrollbar-thumb-drag')) {
// Self-heal stale drag flag: if no thumb is actually dragging,
// unblock the queue resizer immediately.
const activeThumbDrag = document.querySelector('.overlay-scroll__thumb.is-thumb-dragging');
if (!activeThumbDrag) {
document.body.classList.remove('is-overlay-scrollbar-thumb-drag');
} else {
return;
}
}
if (shouldSuppressQueueResizerMouseDown(e.clientX, e.clientY, queueWidth)) return;
setIsDraggingQueue(true);
}}
style={{
display: isQueueVisible ? 'block' : 'none',
right: `${Math.max(0, queueWidth - 3)}px`,
}}
/>
)}
{!isMobile && isQueueVisible && (
)}
{!isMobile && !perfFlags.disableQueuePanelMount &&
}
{isMobile && !isMobilePlayer &&
}
{!isMobilePlayer &&
}
{isFullscreenOpen && (
)}
{!perfFlags.disableTooltipPortal &&
}
);
}
// Media key + tray event handler
function TauriEventBridge() {
const navigate = useNavigate();
// ZIP download progress events from Rust
useEffect(() => {
let unlisten: (() => void) | undefined;
listen<{ id: string; bytes: number; total: number | null }>('download:zip:progress', e => {
useZipDownloadStore.getState().updateProgress(e.payload.id, e.payload.bytes, e.payload.total);
}).then(u => { unlisten = u; });
return () => { unlisten?.(); };
}, []);
// Track-preview lifecycle: Rust audio engine emits start/progress/end. The
// store mirrors them so any tracklist row can render its preview UI.
useEffect(() => {
const unlistenFns: Array<() => void> = [];
listen