diff --git a/app/src/main/kotlin/com/google/samples/apps/nowinandroid/navigation/NiaNavHost.kt b/app/src/main/kotlin/com/google/samples/apps/nowinandroid/navigation/NiaNavHost.kt index f21d09f77..e079c98f4 100644 --- a/app/src/main/kotlin/com/google/samples/apps/nowinandroid/navigation/NiaNavHost.kt +++ b/app/src/main/kotlin/com/google/samples/apps/nowinandroid/navigation/NiaNavHost.kt @@ -50,12 +50,12 @@ fun NiaNavHost( modifier = modifier, ) { forYouSection( - onTopicClick = navController::navigateToTopic + onTopicClick = navController::navigateToTopic, ) { topicScreen( showBackButton = true, onBackClick = navController::popBackStack, - onTopicClick = navController::navigateToTopic + onTopicClick = navController::navigateToTopic, ) } bookmarksScreen( diff --git a/feature/foryou/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/foryou/navigation/ForYouNavigation.kt b/feature/foryou/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/foryou/navigation/ForYouNavigation.kt index 8348aac9f..b77ce72a0 100644 --- a/feature/foryou/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/foryou/navigation/ForYouNavigation.kt +++ b/feature/foryou/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/foryou/navigation/ForYouNavigation.kt @@ -27,6 +27,7 @@ import com.google.samples.apps.nowinandroid.feature.foryou.ForYouScreen import kotlinx.serialization.Serializable @Serializable data object ForYouRoute // route to ForYou screen + @Serializable data object ForYouBaseRoute // route to base navigation graph fun NavController.navigateToForYou(navOptions: NavOptions) = navigate(route = ForYouRoute, navOptions) @@ -40,7 +41,7 @@ fun NavController.navigateToForYou(navOptions: NavOptions) = navigate(route = Fo */ fun NavGraphBuilder.forYouSection( onTopicClick: (String) -> Unit, - topicDestination: NavGraphBuilder.() -> Unit + topicDestination: NavGraphBuilder.() -> Unit, ) { navigation(startDestination = ForYouRoute) { composable(