Update to adaptive alpha12, fix merge issues

Change-Id: I99703db37712abb46b844beb73bb14ddd5283165
dt/nav-safe-args-android-dependency
Don Turner 7 months ago
parent f711e69cd2
commit 68152e5056

@ -104,19 +104,17 @@ internal fun InterestsListDetailScreen(
fun onTopicClickShowDetailPane(topicId: String) {
onTopicClick(topicId)
// TODO (merge): Fix this
//if (listDetailNavigator.isDetailPaneVisible()) {
if (listDetailNavigator.isDetailPaneVisible()) {
// If the detail pane was visible, then use the nestedNavController navigate call
// directly
nestedNavController.navigateToTopic(topicId) {
popUpTo<DetailPaneNavHostDestination>()
}
/*} else {
} else {
// Otherwise, recreate the NavHost entirely, and start at the new destination
nestedNavHostStartDestination = TopicDestination(id = topicId)
nestedNavKey = UUID.randomUUID()
}*/
}
listDetailNavigator.navigateTo(ListDetailPaneScaffoldRole.Detail)
}
@ -124,22 +122,19 @@ internal fun InterestsListDetailScreen(
value = listDetailNavigator.scaffoldValue,
directive = listDetailNavigator.scaffoldDirective,
listPane = {
// TODO (merge): Fix this
//AnimatedPane {
AnimatedPane {
InterestsRoute(
onTopicClick = ::onTopicClickShowDetailPane,
highlightSelectedTopic = listDetailNavigator.isDetailPaneVisible(),
)
//}
}
},
detailPane = {
// TODO (merge): Fix this
//AnimatedPane {
// key(nestedNavKey) {
AnimatedPane {
key(nestedNavKey) {
NavHost(
navController = nestedNavController,
startDestination = nestedNavHostStartDestination,
route = DetailPaneNavHostDestination::class,
startDestination = nestedNavHostStartDestination
) {
topicScreen(
showBackButton = !listDetailNavigator.isListPaneVisible(),
@ -150,17 +145,10 @@ internal fun InterestsListDetailScreen(
TopicDetailPlaceholder()
}
}
// }
//}
},
)
// TODO (merge): Remove
LaunchedEffect(Unit) {
if (selectedTopicId != null) {
// Initial topic ID was provided when navigating to Interests, so show its details.
onTopicClickShowDetailPane(selectedTopicId)
}
}
},
)
}
@OptIn(ExperimentalMaterial3AdaptiveApi::class)

@ -10,7 +10,7 @@ androidxBrowser = "1.8.0"
androidxComposeBom = "2024.02.02"
androidxComposeCompiler = "1.5.8"
androidxComposeUiTest = "1.7.0-alpha06"
androidxComposeMaterial3Adaptive = "1.0.0-alpha10"
androidxComposeMaterial3Adaptive = "1.0.0-alpha12"
androidxComposeRuntimeTracing = "1.0.0-beta01"
androidxCore = "1.12.0"
androidxCoreSplashscreen = "1.0.1"

Loading…
Cancel
Save