Apply current track style to playlist tracks.

housekeeping/remove-warnings
Antoine POPINEAU 2020-08-03 15:29:48 +02:00
rodzic d2e472d770
commit f062e62299
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: A78AC64694F84063
1 zmienionych plików z 7 dodań i 12 usunięć

Wyświetl plik

@ -65,19 +65,14 @@ class PlaylistTracksAdapter(private val context: Context?, private val favoriteL
holder.title.text = track.track.title holder.title.text = track.track.title
holder.artist.text = track.track.artist.name holder.artist.text = track.track.artist.name
Build.VERSION_CODES.P.onApi( context?.let {
{ holder.itemView.background = context.getDrawable(R.drawable.ripple)
holder.title.setTypeface(holder.title.typeface, Typeface.DEFAULT.weight) }
holder.artist.setTypeface(holder.artist.typeface, Typeface.DEFAULT.weight)
},
{
holder.title.setTypeface(holder.title.typeface, Typeface.NORMAL)
holder.artist.setTypeface(holder.artist.typeface, Typeface.NORMAL)
})
if (track.track == currentTrack) { if (track.track == currentTrack || track.track.current) {
holder.title.setTypeface(holder.title.typeface, Typeface.BOLD) context?.let {
holder.artist.setTypeface(holder.artist.typeface, Typeface.BOLD) holder.itemView.background = context.getDrawable(R.drawable.current)
}
} }
context?.let { context?.let {