-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#146 / SplashActivity 삭제 및 IntroActivity 생성, 로직 이동
- Loading branch information
Showing
3 changed files
with
42 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package sopt.uni.presentation | ||
|
||
import android.content.Intent | ||
import android.os.Bundle | ||
import androidx.appcompat.app.AppCompatActivity | ||
import dagger.hilt.android.AndroidEntryPoint | ||
import sopt.uni.data.datasource.local.SparkleStorage | ||
import sopt.uni.presentation.home.HomeActivity | ||
import sopt.uni.presentation.invite.NickNameActivity | ||
import sopt.uni.presentation.onboarding.OnBoardingActivity | ||
import sopt.uni.util.extension.startActivity | ||
|
||
@AndroidEntryPoint | ||
class IntroActivity : AppCompatActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
checkUserStatus() | ||
} | ||
|
||
private fun checkUserStatus() { | ||
if (SparkleStorage.accessToken != null) { | ||
if (SparkleStorage.partnerId != -1) { | ||
startActivity<HomeActivity>() | ||
Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK | ||
} else { | ||
startActivity<NickNameActivity>() | ||
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 | ||
} | ||
} | ||
overridePendingTransition(0, 0) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.