修正动态页面错误

This commit is contained in:
2024-10-27 11:31:27 +08:00
parent be18a60b2b
commit 5b3d663a73
5 changed files with 267 additions and 66 deletions

View File

@@ -146,23 +146,32 @@ fun NavigationController(
navArgument("highlightCommentId") { type = NavType.IntType },
navArgument("initImagePagerIndex") { 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
}
val initIndex = backStackEntry.arguments?.getInt("initImagePagerIndex")
PostScreen(
id!!,
highlightCommentId,
initImagePagerIndex = initIndex
)
enterTransition = {
fadeIn(animationSpec = tween(durationMillis = 200))
},
exitTransition = {
fadeOut(animationSpec = tween(durationMillis = 200))
},
popEnterTransition = {
fadeIn(animationSpec = tween(durationMillis = 200))
},
popExitTransition = {
fadeOut(animationSpec = tween(durationMillis = 200))
}
) { backStackEntry ->
val id = backStackEntry.arguments?.getString("id")
val highlightCommentId =
backStackEntry.arguments?.getInt("highlightCommentId")?.let {
if (it == 0) null else it
}
val initIndex = backStackEntry.arguments?.getInt("initImagePagerIndex")
PostScreen(
id!!,
highlightCommentId,
initImagePagerIndex = initIndex
)
}
composable(route = NavigationRoute.ModificationList.route,
enterTransition = {
fadeIn(animationSpec = tween(durationMillis = 0))
@@ -290,11 +299,9 @@ fun NavigationController(
AccountEditScreen2()
}
composable(route = NavigationRoute.ImageViewer.route) {
CompositionLocalProvider(
LocalAnimatedContentScope provides this,
) {
ImageViewer()
}
ImageViewer()
}
composable(route = NavigationRoute.ChangePasswordScreen.route) {
ChangePasswordScreen()
@@ -353,7 +360,7 @@ fun NavigationController(
CompositionLocalProvider(
LocalAnimatedContentScope provides this,
) {
ChatScreen(it.arguments?.getString("id")!!)
ChatScreen(it.arguments?.getString("id")!!)
}
}
composable(route = NavigationRoute.CommentNoticeScreen.route) {