layout improvements
🏗️ Build and Test JellyTau / Run Tests (push) Successful in 9m2s
Traceability Validation / Check Requirement Traces (push) Successful in 2m30s
🏗️ Build and Test JellyTau / Build Android APK (push) Has been cancelled

This commit is contained in:
2026-06-28 20:14:17 +02:00
parent ef7be645b3
commit 8eae4ae253
12 changed files with 403 additions and 59 deletions
+15 -11
View File
@@ -254,8 +254,9 @@ export const mergedVolume = derived(
* Should show audio miniplayer - state machine gated
* Only true when:
* 1. In remote mode with an active session playing media, OR
* 2. Player is in playing or paused state (not idle, loading, error)
* AND current media is audio (not video: Movie or Episode)
* 2. There is an audio item loaded/queued and we are not in a genuine
* stopped state. The bar stays visible through transient idle/loading/
* seeking blips so it never flickers while advancing between tracks.
*/
export const shouldShowAudioMiniPlayer = derived(
[player, currentMedia, currentQueueItem, isRemoteMode, selectedSession],
@@ -265,14 +266,6 @@ export const shouldShowAudioMiniPlayer = derived(
return true;
}
// Local mode: hide only when there is genuinely nothing loaded
// (idle/stopped/error). Keep showing through loading/seeking transitions
// so the mini player doesn't blink out when advancing between tracks.
const state = $player.state;
if (state.kind === "idle" || state.kind === "error") {
return false;
}
// Determine media type from the player state, falling back to the queue
// item (the player store can momentarily lack media during transitions).
const mediaType = $media?.type ?? $queueItem?.type;
@@ -280,7 +273,18 @@ export const shouldShowAudioMiniPlayer = derived(
return false;
}
// Show for audio content
const state = $player.state;
// A genuine stop clears the queue too, so when the player reports
// idle/error we only hide if there is also no queue item to fall back to.
// This keeps the bar visible through a transient idle/stopped blip emitted
// mid-transition (e.g. sleep-timer churn or a stop-then-load track change),
// while still hiding once playback has truly ended and the queue is empty.
if (state.kind === "idle" || state.kind === "error") {
return $queueItem != null;
}
// playing / paused / loading / seeking — audio is active, show the bar.
return true;
}
);