fix: TrackDetail render mode, pause, and secondary text color
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user