From a43946210f166dc13009f3ce116084307fdaad14 Mon Sep 17 00:00:00 2001 From: Prathamesh More Date: Wed, 17 Nov 2021 21:31:38 +0530 Subject: [PATCH] Fixed full theme continuous crash --- .../fragments/player/full/FullPlayerFragment.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/player/full/FullPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/player/full/FullPlayerFragment.kt index 11d843db..23dd550d 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/player/full/FullPlayerFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/player/full/FullPlayerFragment.kt @@ -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) { + } + }) + } + }) }