Update placeholder color on theme change

This commit is contained in:
Naveen 2023-09-05 15:51:45 +05:30
parent 364d7732a4
commit 1bcab95433
No known key found for this signature in database
GPG key ID: 0E155DAD31671DA3

View file

@ -30,8 +30,8 @@ abstract class BaseMusicAdapter<Type>(
var textToHighlight = ""
val tagHelper by lazy { TagHelper(context) }
val placeholder by lazy { resources.getSmallPlaceholder(textColor) }
val placeholderBig by lazy { resources.getBiggerPlaceholder(textColor) }
var placeholder = resources.getSmallPlaceholder(textColor)
var placeholderBig = resources.getBiggerPlaceholder(textColor)
open val cornerRadius by lazy { resources.getDimension(com.simplemobiletools.commons.R.dimen.rounded_corner_radius_small).toInt() }
init {
@ -164,6 +164,8 @@ abstract class BaseMusicAdapter<Type>(
if (textColor != newTextColor || properPrimaryColor != context.getProperPrimaryColor()) {
updateTextColor(newTextColor)
updatePrimaryColor()
placeholder = resources.getSmallPlaceholder(textColor)
placeholderBig = resources.getBiggerPlaceholder(textColor)
notifyDataChanged()
}
}