diff --git a/app/src/main/kotlin/com/google/samples/apps/nowinandroid/ui/interests2pane/InterestsListDetailScreen.kt b/app/src/main/kotlin/com/google/samples/apps/nowinandroid/ui/interests2pane/InterestsListDetailScreen.kt index 919cb44f24..ea7f5c55b8 100644 --- a/app/src/main/kotlin/com/google/samples/apps/nowinandroid/ui/interests2pane/InterestsListDetailScreen.kt +++ b/app/src/main/kotlin/com/google/samples/apps/nowinandroid/ui/interests2pane/InterestsListDetailScreen.kt @@ -153,7 +153,11 @@ internal fun InterestsListDetailScreen( ) { topicScreen( showBackButton = !listDetailNavigator.isListPaneVisible(), - onBackClick = listDetailNavigator::navigateBack, + onBackClick = { + if(listDetailNavigator.canNavigateBack()) { + listDetailNavigator.navigateBack() + } + }, onTopicClick = ::onTopicClickShowDetailPane, ) composable(route = TOPIC_ROUTE) {