Fixed full theme continuous crash

main
Prathamesh More 2021-11-17 21:31:38 +05:30
parent 8099eb0012
commit a43946210f
1 changed files with 9 additions and 6 deletions

View File

@ -133,12 +133,15 @@ class FullPlayerFragment : AbsPlayerFragment(R.layout.fragment_full) {
private fun updateArtistImage() {
libraryViewModel.artist(MusicPlayerRemote.currentSong.artistId)
.observe(viewLifecycleOwner, { artist ->
GlideApp.with(requireActivity()).asBitmapPalette().artistImageOptions(artist)
.load(RetroGlideExtension.getArtistModel(artist))
.into(object : RetroMusicColoredTarget(binding.artistImage) {
override fun onColorReady(colors: MediaNotificationProcessor) {
}
})
if (artist.id != -1L) {
GlideApp.with(requireActivity()).asBitmapPalette().artistImageOptions(artist)
.load(RetroGlideExtension.getArtistModel(artist))
.into(object : RetroMusicColoredTarget(binding.artistImage) {
override fun onColorReady(colors: MediaNotificationProcessor) {
}
})
}
})
}