From b95ce26f94c79ac30dc16b129c400c5395eafd00 Mon Sep 17 00:00:00 2001 From: JIEUNI Date: Tue, 12 Mar 2024 17:19:28 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20#243=20=EB=A1=9C=EA=B7=B8=EC=95=84?= =?UTF-8?q?=EC=9B=83/=ED=83=88=ED=87=B4=20=ED=9B=84=20=EC=98=A8=EB=B3=B4?= =?UTF-8?q?=EB=94=A9,=20=EC=B5=9C=EC=B4=88=20=EC=A0=91=EC=86=8D=20?= =?UTF-8?q?=EC=8B=9C=20=EC=98=A8=EB=B3=B4=EB=94=A9=20=EB=92=A4=EB=A1=9C?= =?UTF-8?q?=EA=B0=80=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sopt/pingle/presentation/ui/auth/AuthActivity.kt | 11 +++++++++++ .../pingle/presentation/ui/main/more/MoreFragment.kt | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/app/src/main/java/org/sopt/pingle/presentation/ui/auth/AuthActivity.kt b/app/src/main/java/org/sopt/pingle/presentation/ui/auth/AuthActivity.kt index b038f0fc..d0fe5724 100644 --- a/app/src/main/java/org/sopt/pingle/presentation/ui/auth/AuthActivity.kt +++ b/app/src/main/java/org/sopt/pingle/presentation/ui/auth/AuthActivity.kt @@ -13,8 +13,11 @@ import org.sopt.pingle.R import org.sopt.pingle.data.service.KakaoAuthService import org.sopt.pingle.databinding.ActivityAuthBinding import org.sopt.pingle.presentation.ui.main.MainActivity +import org.sopt.pingle.presentation.ui.main.more.MoreFragment.Companion.MORE_FRAGMENT import org.sopt.pingle.presentation.ui.onboarding.onboarding.OnboardingActivity +import org.sopt.pingle.presentation.ui.onboarding.onboarding.OnboardingActivity.Companion.FROM_ACTIVITY import org.sopt.pingle.util.AmplitudeUtils +import org.sopt.pingle.util.activity.setDoubleBackPressToExit import org.sopt.pingle.util.base.BindingActivity import org.sopt.pingle.util.view.UiState import timber.log.Timber @@ -28,10 +31,18 @@ class AuthActivity : BindingActivity(R.layout.activity_auth override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + initLayout() addListeners() collectData() } + private fun initLayout() { + when (intent.getStringExtra(FROM_ACTIVITY)) { + MORE_FRAGMENT -> setDoubleBackPressToExit(binding.root) + else -> Unit + } + } + private fun addListeners() { binding.btnAuthKakao.setOnClickListener { kakaoAuthService.loginKakao(viewModel::login, viewModel::saveAccount) diff --git a/app/src/main/java/org/sopt/pingle/presentation/ui/main/more/MoreFragment.kt b/app/src/main/java/org/sopt/pingle/presentation/ui/main/more/MoreFragment.kt index 1e5e1441..ac333c66 100644 --- a/app/src/main/java/org/sopt/pingle/presentation/ui/main/more/MoreFragment.kt +++ b/app/src/main/java/org/sopt/pingle/presentation/ui/main/more/MoreFragment.kt @@ -17,6 +17,7 @@ import org.sopt.pingle.databinding.FragmentMoreBinding import org.sopt.pingle.presentation.type.SnackbarType import org.sopt.pingle.presentation.ui.auth.AuthActivity import org.sopt.pingle.presentation.ui.mygroup.MyGroupActivity +import org.sopt.pingle.presentation.ui.onboarding.onboarding.OnboardingActivity.Companion.FROM_ACTIVITY import org.sopt.pingle.util.AmplitudeUtils import org.sopt.pingle.util.base.BindingFragment import org.sopt.pingle.util.component.AllModalDialogFragment @@ -135,6 +136,7 @@ class MoreFragment : BindingFragment(R.layout.fragment_more private fun navigateToAuth() { Intent(requireContext(), AuthActivity::class.java).apply { flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK + putExtra(FROM_ACTIVITY, MORE_FRAGMENT) startActivity(this) } } @@ -186,5 +188,7 @@ class MoreFragment : BindingFragment(R.layout.fragment_more private const val WITHDRAW_APP = "withdraw_app" private const val START_MYGROUP = "start_mygroup" + + const val MORE_FRAGMENT = "MoreFragment" } }