mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fix: navigation without home tab enabled (#7046)
This commit is contained in:
parent
a3192c9b37
commit
e3bf39f772
@ -354,11 +354,8 @@ class MainActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onMenuItemActionCollapse(item: MenuItem): Boolean {
|
override fun onMenuItemActionCollapse(item: MenuItem): Boolean {
|
||||||
// Handover back press to `BackPressedDispatcher`
|
// Handover back press to `BackPressedDispatcher` if not on a root destination
|
||||||
if (binding.bottomNav.menu.children.none {
|
if (navController.previousBackStackEntry != null) {
|
||||||
it.itemId == navController.currentDestination?.id
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
this@MainActivity.onBackPressedDispatcher.onBackPressed()
|
this@MainActivity.onBackPressedDispatcher.onBackPressed()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user