mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 08:20:32 +05:30
fix: navigation bar color when pure theme disabled
This commit is contained in:
parent
6ab248c85c
commit
f36e431892
@ -112,8 +112,12 @@ class MainActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sets the color if the navigation bar is visible
|
// sets the color if the navigation bar is visible
|
||||||
val bottomNavColor = SurfaceColors.getColorForElevation(this, binding.bottomNav.elevation).takeIf {
|
val bottomNavColor = if (binding.bottomNav.menu.size() == 0) {
|
||||||
binding.bottomNav.menu.size() > 0
|
null
|
||||||
|
} else if (PreferenceHelper.getBoolean(PreferenceKeys.PURE_THEME, false)) {
|
||||||
|
SurfaceColors.getColorForElevation(this, binding.bottomNav.elevation)
|
||||||
|
} else {
|
||||||
|
ThemeHelper.getThemeColor(this, com.google.android.material.R.attr.colorSurfaceContainer)
|
||||||
}
|
}
|
||||||
ThemeHelper.setSystemBarColors(this, window, bottomNavColor)
|
ThemeHelper.setSystemBarColors(this, window, bottomNavColor)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user