fix(web player + stats modal): no auto-resume after user pause; stable stats modal

Player: opening the PWA no longer auto-plays when the user had paused. Pausing via
the media notification while backgrounded routes through togglePlay, which now sets
S._userPaused; _onForeground only auto-resumes an INVOLUNTARY background stop
(_wasPlayingBeforeHide && !_userPaused). playCurrent clears the flag on a new track.
Involuntary-stop/freeze recovery on foreground is preserved.

Stats modal: no more small→big flash when switching period/tab — the body keeps a
stable min-height and retains its current content until the new data arrives (only
the first open shows 'Lade…'); a per-request token drops out-of-order responses.
SW cache -> ns-v71.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Opus 4.8 committed 2026-08-10 18:06:18 +02:00
1 parent 3129333f9a
commit 1d98b273e7
5 files changed
+21 -9

No files matched your search

+1
View File
@@ -15,6 +15,7 @@ export const S = {
_scrubbing: false,
_msPosLast: 0,
_trackChanging: false,
_userPaused: false, // true when the user deliberately paused → foreground must NOT auto-resume
queueOpen: false,
// Now Playing overlay