fixed status bar color being incorrect sometimes

This commit is contained in:
Jays2Kings 2021-10-29 01:11:20 -04:00
parent b16d164148
commit 5d0dafda7e

View file

@ -492,6 +492,7 @@ fun Controller.setAppBarBG(value: Float, includeTabView: Boolean = false) {
val floatingBar = val floatingBar =
(this as? FloatingSearchInterface)?.showFloatingBar() == true && !includeTabView (this as? FloatingSearchInterface)?.showFloatingBar() == true && !includeTabView
if ((this as? BottomSheetController)?.sheetIsFullscreen() == true) return if ((this as? BottomSheetController)?.sheetIsFullscreen() == true) return
if (router.backstack.lastOrNull()?.controller != this) return
if (floatingBar) { if (floatingBar) {
(activityBinding?.cardView as? CardView)?.setCardBackgroundColor(context.getResourceColor(R.attr.colorPrimaryVariant)) (activityBinding?.cardView as? CardView)?.setCardBackgroundColor(context.getResourceColor(R.attr.colorPrimaryVariant))
activityBinding?.appBar?.setBackgroundColor(Color.TRANSPARENT) activityBinding?.appBar?.setBackgroundColor(Color.TRANSPARENT)