Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/team-yello/YELLO-Android
Browse files Browse the repository at this point in the history
…into fix/#435-shop-amplitude
  • Loading branch information
minju1459 committed Apr 5, 2024
2 parents 58f6391 + 7319911 commit bd9f2b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions app/src/main/java/com/el/yello/presentation/pay/PayActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.net.Uri
import android.os.Bundle
import android.view.View
import android.view.WindowManager
import androidx.activity.OnBackPressedCallback
import androidx.activity.viewModels
import androidx.appcompat.app.AlertDialog
import androidx.core.view.isVisible
Expand Down Expand Up @@ -91,6 +92,7 @@ class PayActivity : BindingActivity<ActivityPayBinding>(R.layout.activity_pay) {
observeCheckInAppValidState()
initPrivacyBtnListener()
initServiceBtnListener()
setBackPressedWhenLoading()
}

private fun initView() {
Expand Down Expand Up @@ -448,6 +450,17 @@ class PayActivity : BindingActivity<ActivityPayBinding>(R.layout.activity_pay) {
window?.clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE)
}

private fun setBackPressedWhenLoading(){
val callback = object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
if (!manager.isPurchasing.value) {
finish()
}
}
}
onBackPressedDispatcher.addCallback(this, callback)
}

// 서버 오류(500) 시 시스템 다이얼로그 띄우기
private fun showErrorDialog() {
AlertDialog.Builder(this).setTitle(getString(R.string.pay_error_dialog_title))
Expand Down
2 changes: 1 addition & 1 deletion build-logic/convention/src/main/kotlin/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ object Constants {
const val compileSdk = 33
const val minSdk = 28
const val targetSdk = 33
const val versionCode = 44
const val versionCode = 45
const val versionName = "2.1"
const val jvmVersion = "17"
}

0 comments on commit bd9f2b6

Please sign in to comment.