maybe fix small glitch when back is progressing

This commit is contained in:
Jays2Kings 2023-10-18 15:37:27 -07:00
parent 3128bea6bc
commit 51fcfc70e6
2 changed files with 2 additions and 1 deletions

View file

@ -555,6 +555,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
container: ViewGroup,
handler: ControllerChangeHandler,
) {
to?.view?.x = 0f
nav.translationY = 0f
showDLQueueTutorial()
if (!(from is DialogController || to is DialogController) && from != null) {

View file

@ -882,7 +882,7 @@ interface BackHandlerControllerInterface {
@CallSuper
fun handleOnBackProgressed(backEvent: BackEventCompat) {
if (this !is Controller) return
if (router.backstackSize > 1) {
if (router.backstackSize > 1 && isControllerVisible) {
val progress = ((backEvent.progress.takeIf { it > 0.001f } ?: 0f) * 0.5f).pow(0.6f)
view?.let { view ->
view.alpha = 1f - progress