fix: navigation without home tab enabled (#7046)

This commit is contained in:
Thomas W. 2025-02-01 21:52:30 +01:00 committed by GitHub
parent a3192c9b37
commit e3bf39f772
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -354,11 +354,8 @@ class MainActivity : BaseActivity() {
}
override fun onMenuItemActionCollapse(item: MenuItem): Boolean {
// Handover back press to `BackPressedDispatcher`
if (binding.bottomNav.menu.children.none {
it.itemId == navController.currentDestination?.id
}
) {
// Handover back press to `BackPressedDispatcher` if not on a root destination
if (navController.previousBackStackEntry != null) {
this@MainActivity.onBackPressedDispatcher.onBackPressed()
}