From 6cfd04b016ecd8ae76276afcaa105c14b9a2cb43 Mon Sep 17 00:00:00 2001 From: Aleksander Nowakowski Date: Mon, 23 Dec 2024 11:29:29 +0100 Subject: [PATCH 1/2] Expose Navigation API used in parameters --- navigation/build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) } From 59e52f8b0dbe893a1d2244c2fb1e7365ea1c5e6c Mon Sep 17 00:00:00 2001 From: Aleksander Nowakowski Date: Mon, 23 Dec 2024 11:36:58 +0100 Subject: [PATCH 2/2] Method was shadowed by native method --- .../java/no/nordicsemi/android/common/navigation/Navigator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)