From 44c2337e3d3d8e951b24a48e2a4da54b3fe3afe1 Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Thu, 29 Apr 2021 00:08:13 -0400 Subject: [PATCH] Fix toolbar elevation issues with theme switching --- .../java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt | 1 + .../eu/kanade/tachiyomi/util/view/ControllerExtensions.kt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt index 34277893cc..30ec0f3b7b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recents/RecentsController.kt @@ -191,6 +191,7 @@ class RecentsController(bundle: Bundle? = null) : binding.shadow2.alpha = if (isCollapsed) 0.25f else 0f binding.shadow.alpha = if (isCollapsed) 0.5f else 0f binding.fakeAppBar.alpha = if (isExpanded) 1f else 0f + updateTitleAndMenu() } if (presenter.recentItems.isNotEmpty()) { 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 4c3832223e..01b1e63df0 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 @@ -322,6 +322,10 @@ fun Controller.scrollViewWith( } ) elevateFunc(recycler.canScrollVertically(-1)) + + recycler.post { + elevateFunc(recycler.canScrollVertically(-1)) + } recycler.addOnScrollListener( object : RecyclerView.OnScrollListener() { override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {