Merge pull request #868 from SimonMarquis/patch-4

Handle topic clicks from all destinations
pull/921/head
Milosz Moczkowski 1 year ago committed by GitHub
commit 851ca6388e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,8 +49,7 @@ fun NiaNavHost(
startDestination = startDestination, startDestination = startDestination,
modifier = modifier, modifier = modifier,
) { ) {
// TODO: handle topic clicks from each top level destination forYouScreen(onTopicClick = navController::navigateToTopic)
forYouScreen(onTopicClick = {})
bookmarksScreen( bookmarksScreen(
onTopicClick = navController::navigateToTopic, onTopicClick = navController::navigateToTopic,
onShowSnackbar = onShowSnackbar, onShowSnackbar = onShowSnackbar,
@ -61,13 +60,11 @@ fun NiaNavHost(
onTopicClick = navController::navigateToTopic, onTopicClick = navController::navigateToTopic,
) )
interestsGraph( interestsGraph(
onTopicClick = { topicId -> onTopicClick = navController::navigateToTopic,
navController.navigateToTopic(topicId)
},
nestedGraphs = { nestedGraphs = {
topicScreen( topicScreen(
onBackClick = navController::popBackStack, onBackClick = navController::popBackStack,
onTopicClick = {}, onTopicClick = navController::navigateToTopic,
) )
}, },
) )

Loading…
Cancel
Save