Ignore duplicate clicks on BottomNavigationView

Co-authored-by: RikkaW <rikka@shizuku.moe>
This commit is contained in:
vvb2060 2022-01-21 17:40:44 +08:00 committed by John Wu
parent 454e5dfc5d
commit a01a3404fe

View File

@ -76,6 +76,9 @@ class MainActivity : BaseMainActivity<MainViewModel, ActivityMainMd2Binding>() {
getScreen(it.itemId)?.navigate() getScreen(it.itemId)?.navigate()
true true
} }
binding.mainNavigation.setOnItemReselectedListener {
// https://issuetracker.google.com/issues/124538620
}
binding.mainNavigation.menu.apply { binding.mainNavigation.menu.apply {
findItem(R.id.superuserFragment)?.isEnabled = Utils.showSuperUser() findItem(R.id.superuserFragment)?.isEnabled = Utils.showSuperUser()
findItem(R.id.modulesFragment)?.isEnabled = Info.env.isActive findItem(R.id.modulesFragment)?.isEnabled = Info.env.isActive