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()
|
subtitle = localMedia?.second.orEmpty()
|
||||||
} else {
|
} else {
|
||||||
val meta = streamMeta
|
val meta = streamMeta
|
||||||
title = meta?.displayTitle?.takeIf { it.isNotEmpty() } ?: stationName
|
val track = meta?.displayTitle?.takeIf { it.isNotEmpty() }
|
||||||
subtitle = if (meta != null && meta.displayTitle.isNotEmpty())
|
if (track != null) {
|
||||||
meta.displayArtist.ifEmpty { stationName } else ""
|
// 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(
|
AnimatedVisibility(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue