diff --git a/navigation/build.gradle.kts b/navigation/build.gradle.kts index d841ea3..f7fbf0f 100644 --- a/navigation/build.gradle.kts +++ b/navigation/build.gradle.kts @@ -53,5 +53,6 @@ android { } dependencies { - implementation(libs.androidx.navigation.compose) + // NavBackStackEntry is exposed in the API of NavigationView. + api(libs.androidx.navigation.compose) } diff --git a/navigation/src/main/java/no/nordicsemi/android/common/navigation/Navigator.kt b/navigation/src/main/java/no/nordicsemi/android/common/navigation/Navigator.kt index 9f4c7df..a137f31 100644 --- a/navigation/src/main/java/no/nordicsemi/android/common/navigation/Navigator.kt +++ b/navigation/src/main/java/no/nordicsemi/android/common/navigation/Navigator.kt @@ -166,7 +166,7 @@ fun SavedStateHandle.get(destination: DestinationId): Nothing = * Pop up to a given destination before navigating. This pops all non-matching destination routes * from the back stack until the destination with a matching route is found. */ -fun NavOptionsBuilder.popUpTo( +fun NavOptionsBuilder.popUpToDestination( destination: DestinationId<*, *>, popUpToBuilder: PopUpToBuilder.() -> Unit = {} ) = popUpTo(destination.name, popUpToBuilder)