fix(queue): suspend idle pull only on user queue edits (#1136)

This commit is contained in:
cucadmuh
2026-06-20 17:11:06 +03:00
committed by GitHub
parent b9b4f76c11
commit 23f8008248
7 changed files with 62 additions and 25 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ export function usePlayQueueSyncLedState(status: ConnectionStatus) {
const { t } = useTranslation();
const activeServerId = useAuthStore(s => s.activeServerId);
const orbitRole = useOrbitStore(s => s.role);
const isPlaying = usePlayerStore(s => s.isPlaying);
const currentRadio = usePlayerStore(s => s.currentRadio);
const [pullInFlight, setPullInFlight] = useState(false);
const idlePullSuspended = useSyncExternalStore(
@@ -40,7 +41,7 @@ export function usePlayQueueSyncLedState(status: ConnectionStatus) {
}, [activeServerId, playbackServerId]);
const autoSyncContext = canAutoIdlePlayQueuePull(status, orbitRole);
const localQueueSyncPaused = autoSyncContext && idlePullSuspended;
const localQueueSyncPaused = autoSyncContext && idlePullSuspended && !isPlaying;
const needsQueuePull = status === 'connected'
&& Boolean(activeServerId)