Fix dynamic theme not being applied when restarting queue after being cleared
This commit is contained in:
@@ -16,7 +16,9 @@ class BitmapProvider(
|
|||||||
private val bitmapSize: Int,
|
private val bitmapSize: Int,
|
||||||
private val colorProvider: (isSystemInDarkMode: Boolean) -> Int
|
private val colorProvider: (isSystemInDarkMode: Boolean) -> Int
|
||||||
) {
|
) {
|
||||||
private var lastUri: Uri? = null
|
var lastUri: Uri? = null
|
||||||
|
private set
|
||||||
|
|
||||||
var lastBitmap: Bitmap? = null
|
var lastBitmap: Bitmap? = null
|
||||||
private var lastIsSystemInDarkMode = false
|
private var lastIsSystemInDarkMode = false
|
||||||
|
|
||||||
|
|||||||
@@ -299,6 +299,8 @@ class PlayerService : InvincibleService(), Player.Listener, PlaybackStatsListene
|
|||||||
|
|
||||||
if (mediaItem == null) {
|
if (mediaItem == null) {
|
||||||
bitmapProvider.listener?.invoke(null)
|
bitmapProvider.listener?.invoke(null)
|
||||||
|
} else if (mediaItem.mediaMetadata.artworkUri == bitmapProvider.lastUri) {
|
||||||
|
bitmapProvider.listener?.invoke(bitmapProvider.lastBitmap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user