Skip to content

Commit

Permalink
[MERGE] #99 -> develop
Browse files Browse the repository at this point in the history
[FIX/#99] 스플래쉬뷰 / 액티비티 intent 조정
  • Loading branch information
Marchbreeze authored Aug 1, 2024
2 parents 677d85a + fb7cba9 commit 28ffbf5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ object Constants {
const val compileSdk = 34
const val minSdk = 28
const val targetSdk = 34
const val versionCode = 1
const val versionCode = 2
const val versionName = "1.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,23 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(R.layout.activity_spl
viewModel.reissueTokenResult.flowWithLifecycle(lifecycle).distinctUntilChanged()
.onEach { isSuccess ->
if (isSuccess) {
Intent(this, MainActivity::class.java).apply {
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
startActivity(this)
}
navigateToMainView()
} else {
navigateToLoginView()
}
}.launchIn(lifecycleScope)
}

private fun navigateToMainView() {
Intent(this, MainActivity::class.java).apply {
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
startActivity(this)
}
}

private fun navigateToLoginView() {
Intent(this, LoginActivity::class.java).apply {
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
startActivity(
this,
ActivityOptions.makeCustomAnimation(
Expand Down

0 comments on commit 28ffbf5

Please sign in to comment.