Skip to content

Commit

Permalink
[FEATURE] #87 : 스플래쉬 화면에서 회원인 경우 바로 홈 화면으로 전환 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Jan 11, 2024
1 parent 766ea8f commit 6af2403
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions app/src/main/java/com/wap/wapp/navigation/WappNavHost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ fun WappNavHost(
},
)
},
navigateToNotice = {
navController.navigateToNotice(
navOptions {
popUpTo(splashNavigationRoute) { inclusive = true }
},
)
},
)
signInScreen(
signInUseCase = signInUseCase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ fun NavController.navigateToSplash(navOptions: NavOptions? = navOptions {}) {
this.navigate(splashNavigationRoute, navOptions)
}

fun NavGraphBuilder.splashScreen(navigateToAuth: () -> Unit) {
fun NavGraphBuilder.splashScreen(
navigateToAuth: () -> Unit,
navigateToNotice: () -> Unit,
) {
composable(route = splashNavigationRoute) {
SplashRoute(navigateToAuth = navigateToAuth)
SplashRoute(
navigateToAuth = navigateToAuth,
navigateToNotice = navigateToNotice,
)
}
}

0 comments on commit 6af2403

Please sign in to comment.