Fix track not showing as active after session restore
The current track is now marked as active even when paused, matching standard player behavior. This fixes the issue where after app restoration, the loaded track doesn't appear active until user interaction. Changed: Remove isPlaybackActive condition from track active state logic in AlbumDetailView and PlaylistDetailView.
This commit is contained in:
1 parent
8b825856d2
commit
ff64e9e56a
2 files changed
+2
-2
No files matched your search
@@ -233,7 +233,7 @@
|
|||||||
artist={track.artist}
|
artist={track.artist}
|
||||||
duration={track.duration}
|
duration={track.duration}
|
||||||
quality={track.quality}
|
quality={track.quality}
|
||||||
isPlaying={isPlaybackActive && activeTrackId === track.id}
|
isPlaying={activeTrackId === track.id}
|
||||||
downloadStatus={downloadInfo.status}
|
downloadStatus={downloadInfo.status}
|
||||||
downloadProgress={downloadInfo.progress}
|
downloadProgress={downloadInfo.progress}
|
||||||
onPlay={() => {
|
onPlay={() => {
|
||||||
|
|||||||
@@ -924,7 +924,7 @@
|
|||||||
|
|
||||||
{#each displayTracks as track, idx (`${track.id}-${downloadStateVersion}`)}
|
{#each displayTracks as track, idx (`${track.id}-${downloadStateVersion}`)}
|
||||||
{@const downloadInfo = track.isLocal ? { status: 'none' as const, progress: 0 } : (getTrackDownloadStatus?.(track.id) ?? { status: 'none' as const, progress: 0 })}
|
{@const downloadInfo = track.isLocal ? { status: 'none' as const, progress: 0 } : (getTrackDownloadStatus?.(track.id) ?? { status: 'none' as const, progress: 0 })}
|
||||||
{@const isActiveTrack = isPlaybackActive && (
|
{@const isActiveTrack = (
|
||||||
track.isLocal
|
track.isLocal
|
||||||
? (track.localTrackId !== undefined && activeTrackId === track.localTrackId)
|
? (track.localTrackId !== undefined && activeTrackId === track.localTrackId)
|
||||||
: activeTrackId === track.id
|
: activeTrackId === track.id
|
||||||
|
|||||||
Reference in new issue
Block a user