mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Deselect all bottom nav items when home tab not among them
This commit is contained in:
parent
5b6b1a3dfa
commit
f29013427c
@ -131,6 +131,8 @@ class MainActivity : BaseActivity() {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (binding.bottomNav.menu.children.none { it.itemId == startFragmentId }) deselectBottomBarItems()
|
||||||
|
|
||||||
binding.toolbar.title = ThemeHelper.getStyledAppName(this)
|
binding.toolbar.title = ThemeHelper.getStyledAppName(this)
|
||||||
|
|
||||||
// handle error logs
|
// handle error logs
|
||||||
@ -179,6 +181,17 @@ class MainActivity : BaseActivity() {
|
|||||||
loadIntentData()
|
loadIntentData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deselect all bottom bar items
|
||||||
|
*/
|
||||||
|
fun deselectBottomBarItems() {
|
||||||
|
binding.bottomNav.menu.setGroupCheckable(0, true, false)
|
||||||
|
for (child in binding.bottomNav.menu.children) {
|
||||||
|
child.isChecked = false
|
||||||
|
}
|
||||||
|
binding.bottomNav.menu.setGroupCheckable(0, true, true)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to find a scroll or recycler view and scroll it back to the top
|
* Try to find a scroll or recycler view and scroll it back to the top
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user