Add check for backstack size before pushing DownloadController (#5312)

This commit is contained in:
Hunter Nickel 2021-06-04 16:52:30 -06:00 committed by GitHub
parent 85a1eb75c9
commit 64f95af3e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,7 +172,9 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
controller?.showSettingsSheet()
}
R.id.nav_updates -> {
router.pushController(DownloadController().withFadeTransaction())
if (router.backstackSize == 1) {
router.pushController(DownloadController().withFadeTransaction())
}
}
}
}