Fixed full theme continuous crash

This commit is contained in:
Prathamesh More 2021-11-17 21:31:38 +05:30
parent 8099eb0012
commit a43946210f

View file

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