Skip to content

Commit

Permalink
#146 / 화면 분기처리 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
taeheeL committed Dec 9, 2023
1 parent 6aa385f commit 125d137
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions app/src/main/java/sopt/uni/presentation/IntroActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sopt.uni.presentation

import android.content.Intent
import android.os.Bundle
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
import dagger.hilt.android.AndroidEntryPoint
import sopt.uni.data.datasource.local.SparkleStorage
Expand All @@ -20,6 +21,8 @@ class IntroActivity : AppCompatActivity() {

private fun checkUserStatus() {
if (SparkleStorage.accessToken != null) {
Log.e("accessToken", SparkleStorage.accessToken.toString())
Log.e("partnerId", SparkleStorage.partnerId.toString())
if (SparkleStorage.partnerId != -1) {
startActivity<HomeActivity>()
Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
Expand All @@ -28,13 +31,8 @@ class IntroActivity : AppCompatActivity() {
Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
}
} else {
if (SparkleStorage.partnerId != -1) {
startActivity<HomeActivity>()
Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
} else {
startActivity<OnBoardingActivity>()
Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
}
startActivity<OnBoardingActivity>()
Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
}
overridePendingTransition(0, 0)
}
Expand Down

0 comments on commit 125d137

Please sign in to comment.