Close drawer if current tab is selected
This commit is contained in:
@@ -74,6 +74,7 @@ class MainActivity : AppCompatActivity(R.layout.main_activity) {
|
||||
logger.v { "onNavigationItemSelected() called with: menuItem = $menuItem" }
|
||||
if (menuItem.isChecked) {
|
||||
logger.d { "Not navigating because it is the current destination" }
|
||||
binding.drawer.close()
|
||||
return true
|
||||
}
|
||||
val directions = when (menuItem.itemId) {
|
||||
|
||||
Reference in New Issue
Block a user