properly handle updating letter fastscroller related colors

This commit is contained in:
tibbi 2020-05-03 20:09:22 +02:00
parent e8c9958306
commit 419431247b
1 changed files with 5 additions and 0 deletions

View File

@ -85,11 +85,16 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
updateTextColor(color) updateTextColor(color)
} }
} }
letter_fastscroller?.textColor = color.getColorStateList()
} }
fun primaryColorChanged() { fun primaryColorChanged() {
fragment_fastscroller?.updatePrimaryColor() fragment_fastscroller?.updatePrimaryColor()
fragment_fastscroller?.updateBubblePrimaryColor() fragment_fastscroller?.updateBubblePrimaryColor()
letter_fastscroller_thumb?.thumbColor = config.primaryColor.getColorStateList()
letter_fastscroller_thumb?.textColor = config.primaryColor.getContrastColor()
(fragment_list.adapter as? ContactsAdapter)?.apply { (fragment_list.adapter as? ContactsAdapter)?.apply {
adjustedPrimaryColor = context.getAdjustedPrimaryColor() adjustedPrimaryColor = context.getAdjustedPrimaryColor()
} }