Fixed bottombar interface logic

This commit is contained in:
Jay 2020-02-23 01:16:41 -08:00
parent a529667257
commit 1da1b281eb

View File

@ -132,10 +132,10 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
val id = item.itemId val id = item.itemId
val currentController = router.backstack.lastOrNull()?.controller() val currentController = router.backstack.lastOrNull()?.controller()
if (!continueSwitchingTabs && currentController is BottomNavBarInterface) { if (!continueSwitchingTabs && currentController is BottomNavBarInterface) {
return@setOnNavigationItemSelectedListener currentController.canChangeTabs { if (!currentController.canChangeTabs {
continueSwitchingTabs = true continueSwitchingTabs = true
this@MainActivity.navigationView.selectedItemId = id this@MainActivity.navigationView.selectedItemId = id
} }) return@setOnNavigationItemSelectedListener false
} }
continueSwitchingTabs = false continueSwitchingTabs = false
val currentRoot = router.backstack.firstOrNull() val currentRoot = router.backstack.firstOrNull()