Simplifies nav bar selected calculations
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user