mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
parent
f368cefab3
commit
fed555d69d
1 changed files with 21 additions and 0 deletions
|
@ -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(
|
fun Controller.scrollViewWith(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue