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:
parent
4f8d3e9299
commit
eb32aed07c
1 changed files with 11 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue