From fc3a500e27faf1d71c006b30cf453993aa68ede9 Mon Sep 17 00:00:00 2001 From: boiledegg Date: Fri, 19 Jul 2024 21:40:34 +0900 Subject: [PATCH] =?UTF-8?q?[FIX/#151]=20Home=20=ED=99=94=EB=A9=B4=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=A2=85=EB=A3=8C=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../terning/feature/onboarding/splash/SplashScreen.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/feature/src/main/java/com/terning/feature/onboarding/splash/SplashScreen.kt b/feature/src/main/java/com/terning/feature/onboarding/splash/SplashScreen.kt index 8d95835d5..774425f78 100644 --- a/feature/src/main/java/com/terning/feature/onboarding/splash/SplashScreen.kt +++ b/feature/src/main/java/com/terning/feature/onboarding/splash/SplashScreen.kt @@ -11,12 +11,14 @@ import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.flowWithLifecycle import androidx.navigation.NavController +import androidx.navigation.NavOptions import com.google.accompanist.systemuicontroller.rememberSystemUiController import com.terning.core.designsystem.component.image.TerningImage import com.terning.core.designsystem.theme.TerningMain import com.terning.feature.R import com.terning.feature.home.home.navigation.navigateHome import com.terning.feature.onboarding.signin.navigation.navigateSignIn +import com.terning.feature.onboarding.splash.navigation.Splash @Composable fun SplashScreen( @@ -45,12 +47,17 @@ fun SplashScreen( .collect { sideEffect -> when (sideEffect) { is SplashState.GetHasAccessToken -> { - if (sideEffect.hasAccessToken) navController.navigateHome() + if (sideEffect.hasAccessToken) navController.navigateHome( + navOptions = NavOptions.Builder().setPopUpTo( + route = Splash, + inclusive = true + ).build() + ) else navController.navigateSignIn() } - } } + } Column(