Skip to content

Commit

Permalink
Merge pull request #1243 from Infomaniak/remove-usless-navigation-check
Browse files Browse the repository at this point in the history
Simplify clear of backstack after selecting back item from bottom navigation because there are no more file lists
  • Loading branch information
KevinBoulongne authored Mar 18, 2024
2 parents 65386e9 + 6ba8dab commit 0f8a51a
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 0f8a51a

Please sign in to comment.