Fix dynamic theme not being applied when restarting queue after being cleared

This commit is contained in:
vfsfitvnm 2022-09-15 20:00:44 +02:00
parent b35b3b2df2
commit 8588f022a2
2 changed files with 5 additions and 1 deletions

View file

@ -16,7 +16,9 @@ class BitmapProvider(
private val bitmapSize: Int,
private val colorProvider: (isSystemInDarkMode: Boolean) -> Int
) {
private var lastUri: Uri? = null
var lastUri: Uri? = null
private set
var lastBitmap: Bitmap? = null
private var lastIsSystemInDarkMode = false

View file

@ -299,6 +299,8 @@ class PlayerService : InvincibleService(), Player.Listener, PlaybackStatsListene
if (mediaItem == null) {
bitmapProvider.listener?.invoke(null)
} else if (mediaItem.mediaMetadata.artworkUri == bitmapProvider.lastUri) {
bitmapProvider.listener?.invoke(bitmapProvider.lastBitmap)
}
}