fix: TrackDetail render mode, pause, and secondary text color

This commit is contained in:
daniel-c-harvey
2026-06-06 16:45:07 -04:00
parent 0dd33a5dfc
commit 93d9b47a67
2 changed files with 7 additions and 5 deletions
@@ -67,9 +67,12 @@ public partial class TrackDetail : ComponentBase, IDisposable
{
if (ViewModel.Track is null) return;
// Resume the current track if it's merely paused; otherwise stream the new selection.
// SelectTrackStreaming is the live entry point — the buffered SelectTrack path is dead.
if (PlayerService.CurrentTrack?.Id == ViewModel.Track.Id && PlayerService.IsPaused)
var isThisTrack = PlayerService.CurrentTrack?.Id == ViewModel.Track.Id;
// Toggle play/pause if this track is already the active one (playing or paused);
// otherwise start a fresh stream. SelectTrackStreaming is the live entry point —
// the buffered SelectTrack path is dead.
if (isThisTrack && (PlayerService.IsPlaying || PlayerService.IsPaused))
{
await PlayerService.TogglePlayPause();
}