Skip to content

Commit

Permalink
[MERGE] #161 -> develop
Browse files Browse the repository at this point in the history
[FIX/#161] Home ν™”λ©΄μ—μ„œ μ’…λ£Œ κ΅¬ν˜„
  • Loading branch information
boiledEgg-s authored Jul 19, 2024
2 parents 0e3366c + fc3a500 commit f3e092a
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit f3e092a

Please sign in to comment.