Skip to content

Commit

Permalink
Simplify clear of backstack after selecting back item from bottom nav…
Browse files Browse the repository at this point in the history
…igation because there are no more file lists

This modifies the fix introduced in 5549ad0
  • Loading branch information
LunarX authored and KevinBoulongne committed Mar 18, 2024
1 parent 65386e9 commit 6ba8dab
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/src/main/java/com/infomaniak/drive/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,7 @@ class MainActivity : BaseActivity() {
itemIconTintList = ContextCompat.getColorStateList(this@MainActivity, R.color.item_icon_tint_bottom)
selectedItemId = uiSettings.bottomNavigationSelectedItem
setOnItemReselectedListener { item ->
when (item.itemId) {
R.id.rootFilesFragment, R.id.favoritesFragment -> {
navController.popBackStack(R.id.homeFragment, false)
navController.navigate(item.itemId)
}
else -> navController.popBackStack(item.itemId, false)
}
navController.popBackStack(item.itemId, false)
}
}
}
Expand Down

0 comments on commit 6ba8dab

Please sign in to comment.