fix(ui): mini-player attributes track to its station

Radio subtitle is now 'artist · Station' so a track name never looks
like it contradicts the station shown in the list/hub.
This commit is contained in:
avi 2026-09-08 09:39:26 -05:00
commit eb32aed07c

View file

@ -72,9 +72,17 @@ fun NowPlayingBar(
subtitle = localMedia?.second.orEmpty()
} else {
val meta = streamMeta
title = meta?.displayTitle?.takeIf { it.isNotEmpty() } ?: stationName
subtitle = if (meta != null && meta.displayTitle.isNotEmpty())
meta.displayArtist.ifEmpty { stationName } else ""
val track = meta?.displayTitle?.takeIf { it.isNotEmpty() }
if (track != null) {
// Radio playing a tagged track: track on top, "artist · Station"
// below so the track is always attributable to its station.
title = track
val artist = meta?.displayArtist.orEmpty()
subtitle = if (artist.isNotEmpty()) "$artist · $stationName" else stationName
} else {
title = stationName
subtitle = ""
}
}
AnimatedVisibility(