From 93d9b47a6725c439dcb7810ec24524c8c39a82fb Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Sat, 6 Jun 2026 16:45:07 -0400 Subject: [PATCH] fix: TrackDetail render mode, pause, and secondary text color --- DeepDrftPublic.Client/Pages/TrackDetail.razor | 3 +-- DeepDrftPublic.Client/Pages/TrackDetail.razor.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/DeepDrftPublic.Client/Pages/TrackDetail.razor b/DeepDrftPublic.Client/Pages/TrackDetail.razor index 09befe3..33c0d14 100644 --- a/DeepDrftPublic.Client/Pages/TrackDetail.razor +++ b/DeepDrftPublic.Client/Pages/TrackDetail.razor @@ -1,5 +1,4 @@ @page "/track/{EntryKey}" -@rendermode InteractiveWebAssembly @(ViewModel.Track?.TrackName ?? "Track") - DeepDrft @@ -24,7 +23,7 @@ else if (ViewModel.NotFound)
Track not found. - + This track may have been moved or removed.
diff --git a/DeepDrftPublic.Client/Pages/TrackDetail.razor.cs b/DeepDrftPublic.Client/Pages/TrackDetail.razor.cs index 1c1e4c0..5111d20 100644 --- a/DeepDrftPublic.Client/Pages/TrackDetail.razor.cs +++ b/DeepDrftPublic.Client/Pages/TrackDetail.razor.cs @@ -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(); }