Twelve: Set playlist image to playlist thumbnail
Change-Id: I1febadbf1663c3a876938f7af3755fd2712f4a5a
diff --git a/app/src/main/java/org/lineageos/twelve/fragments/PlaylistFragment.kt b/app/src/main/java/org/lineageos/twelve/fragments/PlaylistFragment.kt
index 45d16c7..9b8354e 100644
--- a/app/src/main/java/org/lineageos/twelve/fragments/PlaylistFragment.kt
+++ b/app/src/main/java/org/lineageos/twelve/fragments/PlaylistFragment.kt
@@ -9,6 +9,7 @@
import android.os.Bundle
import android.util.Log
import android.view.View
+import android.widget.ImageView
import android.widget.TextView
import androidx.core.os.bundleOf
import androidx.core.view.ViewCompat
@@ -63,6 +64,7 @@
private val playAllFloatingActionButton by getViewProperty<FloatingActionButton>(R.id.playAllFloatingActionButton)
private val playlistNameTextView by getViewProperty<TextView>(R.id.playlistNameTextView)
private val recyclerView by getViewProperty<RecyclerView>(R.id.recyclerView)
+ private val thumbnailImageView by getViewProperty<ImageView>(R.id.thumbnailImageView)
private val toolbar by getViewProperty<MaterialToolbar>(R.id.toolbar)
private val tracksInfoTextView by getViewProperty<TextView>(R.id.tracksInfoTextView)
@@ -237,6 +239,8 @@
toolbar.title = playlist.name
playlistNameTextView.text = playlist.name
+ thumbnailImageView.setImageResource(R.drawable.ic_playlist_play)
+
val totalDurationMs = audios.sumOf { audio ->
audio?.durationMs ?: 0
}