Simplifies nav bar selected calculations

This commit is contained in:
Vitor Pamplona
2024-08-21 15:51:01 -04:00
parent 6668e5a178
commit 8d8016e01b
@@ -158,12 +158,10 @@ private fun RowScope.HasNewItemsIcon(
nav: (Route, Boolean) -> Unit, nav: (Route, Boolean) -> Unit,
) { ) {
val selected = val selected =
( navEntryState.value
navEntryState.value ?.destination
?.destination ?.route
?.route ?.startsWith(route.base) ?: false
?.indexOf(route.base) ?: -1
) > -1
NavigationBarItem( NavigationBarItem(
alwaysShowLabel = false, alwaysShowLabel = false,