From 696cc1a783b9c735e430d79aae80929d5817cf10 Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Mon, 17 Apr 2023 14:26:06 +0900 Subject: [PATCH] Add a handler a topic is clicked in the search screen --- .../google/samples/apps/nowinandroid/navigation/NiaNavHost.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/google/samples/apps/nowinandroid/navigation/NiaNavHost.kt b/app/src/main/java/com/google/samples/apps/nowinandroid/navigation/NiaNavHost.kt index 17e9835bc..5f39eef7d 100644 --- a/app/src/main/java/com/google/samples/apps/nowinandroid/navigation/NiaNavHost.kt +++ b/app/src/main/java/com/google/samples/apps/nowinandroid/navigation/NiaNavHost.kt @@ -54,7 +54,9 @@ fun NiaNavHost( searchScreen( onBackClick = navController::popBackStack, onInterestsClick = { appState.navigateToTopLevelDestination(INTERESTS) }, - onTopicClick = {}, + onTopicClick = { + navController.navigateToTopic(it) + }, ) interestsGraph( onTopicClick = { topicId ->