更新代码
This commit is contained in:
@@ -27,7 +27,9 @@ import androidx.navigation.navArgument
|
||||
import com.aiosman.ravenow.LocalAnimatedContentScope
|
||||
import com.aiosman.ravenow.LocalNavController
|
||||
import com.aiosman.ravenow.LocalSharedTransitionScope
|
||||
import com.aiosman.ravenow.ui.about.AboutScreen
|
||||
import com.aiosman.ravenow.ui.account.AccountEditScreen2
|
||||
import com.aiosman.ravenow.ui.account.AccountSetting
|
||||
import com.aiosman.ravenow.ui.account.ResetPasswordScreen
|
||||
import com.aiosman.ravenow.ui.chat.ChatScreen
|
||||
import com.aiosman.ravenow.ui.comment.CommentsScreen
|
||||
@@ -90,6 +92,8 @@ sealed class NavigationRoute(
|
||||
data object Chat : NavigationRoute("Chat/{id}")
|
||||
data object CommentNoticeScreen : NavigationRoute("CommentNoticeScreen")
|
||||
data object ImageCrop : NavigationRoute("ImageCrop")
|
||||
data object AccountSetting : NavigationRoute("AccountSetting")
|
||||
data object AboutScreen : NavigationRoute("AboutScreen")
|
||||
}
|
||||
|
||||
|
||||
@@ -377,6 +381,20 @@ fun NavigationController(
|
||||
ImageCropScreen()
|
||||
}
|
||||
}
|
||||
composable(route = NavigationRoute.AccountSetting.route) {
|
||||
CompositionLocalProvider(
|
||||
LocalAnimatedContentScope provides this,
|
||||
) {
|
||||
AccountSetting()
|
||||
}
|
||||
}
|
||||
composable(route = NavigationRoute.AboutScreen.route) {
|
||||
CompositionLocalProvider(
|
||||
LocalAnimatedContentScope provides this,
|
||||
) {
|
||||
AboutScreen()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -424,4 +442,10 @@ fun NavHostController.navigateToChat(id: String) {
|
||||
route = NavigationRoute.Chat.route
|
||||
.replace("{id}", id)
|
||||
)
|
||||
}
|
||||
|
||||
fun NavHostController.goTo(
|
||||
route: NavigationRoute
|
||||
) {
|
||||
navigate(route.route)
|
||||
}
|
||||
Reference in New Issue
Block a user