新增对话
This commit is contained in:
@@ -29,6 +29,7 @@ import com.aiosman.riderpro.LocalNavController
|
||||
import com.aiosman.riderpro.LocalSharedTransitionScope
|
||||
import com.aiosman.riderpro.ui.account.AccountEditScreen2
|
||||
import com.aiosman.riderpro.ui.account.ResetPasswordScreen
|
||||
import com.aiosman.riderpro.ui.chat.ChatScreen
|
||||
import com.aiosman.riderpro.ui.comment.CommentsScreen
|
||||
import com.aiosman.riderpro.ui.favourite.FavouriteListPage
|
||||
import com.aiosman.riderpro.ui.favourite.FavouriteNoticeScreen
|
||||
@@ -84,6 +85,7 @@ sealed class NavigationRoute(
|
||||
data object FollowingList : NavigationRoute("FollowingList/{id}")
|
||||
data object ResetPassword : NavigationRoute("ResetPassword")
|
||||
data object FavouriteList : NavigationRoute("FavouriteList")
|
||||
data object Chat : NavigationRoute("Chat/{id}")
|
||||
}
|
||||
|
||||
|
||||
@@ -340,6 +342,16 @@ fun NavigationController(
|
||||
FavouriteListPage()
|
||||
}
|
||||
}
|
||||
composable(
|
||||
route = NavigationRoute.Chat.route,
|
||||
arguments = listOf(navArgument("id") { type = NavType.StringType })
|
||||
) {
|
||||
CompositionLocalProvider(
|
||||
LocalAnimatedContentScope provides this,
|
||||
) {
|
||||
ChatScreen(it.arguments?.getString("id")!!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -381,4 +393,11 @@ fun NavHostController.navigateToPost(
|
||||
.replace("{highlightCommentId}", highlightCommentId.toString())
|
||||
.replace("{initImagePagerIndex}", initImagePagerIndex.toString())
|
||||
)
|
||||
}
|
||||
|
||||
fun NavHostController.navigateToChat(id: String) {
|
||||
navigate(
|
||||
route = NavigationRoute.Chat.route
|
||||
.replace("{id}", id)
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user