-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change API to access all host / scoped host entries through the state
This is more similar to the NavHostScope interface now and should be easier to understand and use.
- Loading branch information
Showing
3 changed files
with
32 additions
and
44 deletions.
There are no files selected for viewing
5 changes: 3 additions & 2 deletions
5
reimagined/src/androidTest/kotlin/dev/olshevski/navigation/reimagined/NavHostStateExt.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
package dev.olshevski.navigation.reimagined | ||
|
||
internal fun <T, S> NavHostStateImpl<T, S>.findHostEntry(destination: T) = | ||
hostEntriesMap.values.find { it.destination == destination }!! | ||
@OptIn(ExperimentalReimaginedApi::class) | ||
internal fun <T> NavHostState<T>.findHostEntry(destination: T) = | ||
hostEntries.find { it.destination == destination }!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters