From fed555d69dd73bbbbcc30b7e41dab9862f7f2e0b Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Sun, 5 Nov 2023 00:49:46 -0700 Subject: [PATCH] Fix disappearing migrations app bar Fixes #1669 --- .../util/view/ControllerExtensions.kt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) 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 3173d4bd1968..af104354b592 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 @@ -254,6 +254,27 @@ fun Controller.liftAppbarWith( } }, ) + addLifecycleListener( + object : Controller.LifecycleListener() { + override fun onChangeStart( + controller: Controller, + changeHandler: ControllerChangeHandler, + changeType: ControllerChangeType, + ) { + super.onChangeStart(controller, changeHandler, changeType) + if (changeType.isEnter) { + activityBinding?.appBar?.hideBigView( + true, + setTitleAlpha = this@liftAppbarWith !is MangaDetailsController, + ) + activityBinding?.appBar?.setToolbarModeBy(this@liftAppbarWith) + activityBinding?.appBar?.useTabsInPreLayout = false + colorToolbar(isToolbarColored) + activityBinding?.appBar?.updateAppBarAfterY(recycler) + } + } + }, + ) } fun Controller.scrollViewWith(