Taste-profile fidelity (M160) + Songs-like row + home polish #109
@@ -1094,13 +1094,15 @@ internal fun buildSongsLikeRow(
|
||||
offline: Boolean,
|
||||
): List<PlaylistRowItem> {
|
||||
val mixes = owned.filter { it.systemVariant == "songs_like_artist" }
|
||||
if (offline) {
|
||||
val (available, greyed) = mixes.partition { !it.unavailableOffline }
|
||||
return (available + greyed).map { PlaylistRowItem.Real(it) }
|
||||
}
|
||||
if (mixes.isNotEmpty()) return mixes.map { PlaylistRowItem.Real(it) }
|
||||
return List(SONGS_LIKE_PLACEHOLDER_SLOTS) {
|
||||
PlaylistRowItem.Placeholder("Songs like…", variantFor("songs-like", status))
|
||||
return when {
|
||||
offline -> {
|
||||
val (available, greyed) = mixes.partition { !it.unavailableOffline }
|
||||
(available + greyed).map { PlaylistRowItem.Real(it) }
|
||||
}
|
||||
mixes.isNotEmpty() -> mixes.map { PlaylistRowItem.Real(it) }
|
||||
else -> List(SONGS_LIKE_PLACEHOLDER_SLOTS) {
|
||||
PlaylistRowItem.Placeholder("Songs like…", variantFor("songs-like", status))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user