From 1ab54487d1af6b8316610c84f960a37c875b44d5 Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Sat, 1 May 2021 22:11:23 -0400 Subject: [PATCH] Fix wrongful elevation on app config change for floating toolbars --- .../tachiyomi/util/view/ControllerExtensions.kt | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/view/ControllerExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/view/ControllerExtensions.kt index f27f738e4c..c1177a8496 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/view/ControllerExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/view/ControllerExtensions.kt @@ -225,11 +225,7 @@ fun Controller.scrollViewWith( liftOnScroll.invoke(el) } else { elevationAnim?.cancel() - val floatingBar = - !( - activityBinding?.toolbar?.isVisible == true || - (activityBinding?.tabsFrameLayout?.isVisible == true && includeTabView) - ) + val floatingBar = (this as? FloatingSearchInterface)?.showFloatingBar() == true && !includeTabView if (floatingBar) { activityBinding?.appBar?.elevation = 0f return@f @@ -244,12 +240,7 @@ fun Controller.scrollViewWith( elevationAnim?.start() } } - val floatingBar = - !( - activityBinding?.toolbar?.isVisible == true || - (activityBinding?.tabsFrameLayout?.isVisible == true && includeTabView) - ) - if (floatingBar) { + if ((this as? FloatingSearchInterface)?.showFloatingBar() == true && !includeTabView) { activityBinding?.appBar?.elevation = 0f } addLifecycleListener(