更改推送

This commit is contained in:
2024-09-20 17:10:54 +08:00
parent 93182c3985
commit 054dd68b89
20 changed files with 390 additions and 138 deletions

View File

@@ -61,7 +61,7 @@ sealed class NavigationRoute(
data object LocationDetail : NavigationRoute("LocationDetail/{x}/{y}")
data object OfficialPhoto : NavigationRoute("OfficialPhoto")
data object OfficialPhotographer : NavigationRoute("OfficialPhotographer")
data object Post : NavigationRoute("Post/{id}")
data object Post : NavigationRoute("Post/{id}/{highlightCommentId}")
data object ModificationList : NavigationRoute("ModificationList")
data object MyMessage : NavigationRoute("MyMessage")
data object Comments : NavigationRoute("Comments")
@@ -135,14 +135,21 @@ fun NavigationController(
}
composable(
route = NavigationRoute.Post.route,
arguments = listOf(navArgument("id") { type = NavType.StringType }),
arguments = listOf(
navArgument("id") { type = NavType.StringType },
navArgument("highlightCommentId") { type = NavType.IntType }
),
) { backStackEntry ->
CompositionLocalProvider(
LocalAnimatedContentScope provides this,
) {
val id = backStackEntry.arguments?.getString("id")
val highlightCommentId = backStackEntry.arguments?.getInt("highlightCommentId")?.let {
if (it == 0) null else it
}
PostScreen(
id!!
id!!,
highlightCommentId
)
}
}