mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Fix nav bar color on older devices
This commit is contained in:
parent
4b4c38b3bd
commit
a6e3acba9f
1 changed files with 6 additions and 4 deletions
|
@ -263,10 +263,12 @@ class MangaDetailsController :
|
|||
(colorToUse ?: manga?.vibrantCoverColor)?.let { color ->
|
||||
val newColor =
|
||||
makeColorFrom(color, context.getResourceColor(R.attr.colorPrimaryVariant))
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1 || context.isInNightMode()) {
|
||||
activity?.window?.navigationBarColor = ColorUtils.setAlphaComponent(
|
||||
newColor,
|
||||
Color.alpha(activity?.window?.navigationBarColor ?: Color.BLACK)
|
||||
)
|
||||
}
|
||||
newColor
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue