diff --git a/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt b/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt index 7d4a0d4..7bbec89 100644 --- a/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt +++ b/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt @@ -161,14 +161,15 @@ class SelfieFragment : BaseFragment(R.layout.fragment_sel AmplitudeManager.trackEvent( EVENT_CLICK_BTN, amplitudePage, mapOf(PROPERTY_BTN to "createpic"), ) - with(viewModel) { - if (isCreatingParentPic) { - startValidProcessLoading() - manager.purchaseProduct() - } else { - startSendingImages() - } - } +// with(viewModel) { +// if (isCreatingParentPic) { +// startValidProcessLoading() +// manager.purchaseProduct() +// } else { +// startSendingImages() +// } +// } + toast(stringOf(R.string.toast_service_finished)) } } diff --git a/presentation/src/main/java/kr/genti/presentation/main/CreateUnableDialog.kt b/presentation/src/main/java/kr/genti/presentation/main/CreateUnableDialog.kt index 9dfc89b..dea59f9 100644 --- a/presentation/src/main/java/kr/genti/presentation/main/CreateUnableDialog.kt +++ b/presentation/src/main/java/kr/genti/presentation/main/CreateUnableDialog.kt @@ -3,12 +3,16 @@ package kr.genti.presentation.main import android.os.Bundle import android.view.View import android.view.WindowManager +import androidx.fragment.app.activityViewModels import kr.genti.core.base.BaseDialog import kr.genti.core.extension.setOnSingleClickListener import kr.genti.presentation.R import kr.genti.presentation.databinding.DialogCreateUnableBinding class CreateUnableDialog : BaseDialog(R.layout.dialog_create_unable) { + + private val viewModel by activityViewModels() + override fun onStart() { super.onStart() dialog?.window?.apply { @@ -31,7 +35,10 @@ class CreateUnableDialog : BaseDialog(R.layout.dialog } private fun initCloseBtnListener() { - binding.btnReturn.setOnSingleClickListener { dismiss() } + binding.btnReturn.setOnSingleClickListener { + viewModel.getIsUserVerifiedFromServer() + dismiss() + } } private fun setBodyText() { diff --git a/presentation/src/main/java/kr/genti/presentation/main/MainActivity.kt b/presentation/src/main/java/kr/genti/presentation/main/MainActivity.kt index bff030b..4a77ff8 100644 --- a/presentation/src/main/java/kr/genti/presentation/main/MainActivity.kt +++ b/presentation/src/main/java/kr/genti/presentation/main/MainActivity.kt @@ -196,13 +196,9 @@ class MainActivity : BaseActivity(R.layout.activity_main) { viewModel.serverAvailableState.flowWithLifecycle(lifecycle).onEach { state -> when (state) { is UiState.Success -> { - if (state.data.status) { - viewModel.getIsUserVerifiedFromServer() - } else { - createUnableDialog = - CreateUnableDialog.newInstance(state.data.message.orEmpty()) - createUnableDialog?.show(supportFragmentManager, DIALOG_UNABLE) - } + createUnableDialog = + CreateUnableDialog.newInstance(state.data.message.orEmpty()) + createUnableDialog?.show(supportFragmentManager, DIALOG_UNABLE) } is UiState.Failure -> toast(stringOf(R.string.error_msg)) diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index 539f4b3..642218e 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -205,10 +205,12 @@ 나가기 현재 점검 중입니다! - 닫기 + 확인 결제 오류 오류로 인해 상품이 지급되지 않았어요. 고객센터로 문의 주시면 해결을 도와드리겠습니다. 확인 + 서비스가 종료되어 생성이 불가능해요. + \ No newline at end of file