Skip to content

Commit

Permalink
Fix disappearing migrations app bar
Browse files Browse the repository at this point in the history
Fixes #1669
  • Loading branch information
Jays2Kings committed Nov 5, 2023
1 parent f368cef commit fed555d
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,27 @@ fun <T> 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(
Expand Down

0 comments on commit fed555d

Please sign in to comment.