Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemHryhorovGeniusee committed Jun 23, 2022
1 parent ce4036c commit f07ef56
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ class PaymentSummaryActivity : BaseActivity() {
finish()
}
binding.confirmButton.setOnClickListener {
if (topUpPriceCardItem?.id?.isNotEmpty() == true) {
launchPlayBillingPayment()
}
launchPlayBillingPayment()
}
binding.cancelButton.setOnClickListener {
navigateToHome()
Expand Down Expand Up @@ -117,6 +115,8 @@ class PaymentSummaryActivity : BaseActivity() {
}

private fun launchPlayBillingPayment() {
if (topUpPriceCardItem?.id?.isEmpty() == true) return

topUpPriceCardItem?.let {
paymentViewModel.billingDataSource.launchBillingFlow(
this@PaymentSummaryActivity,
Expand Down

0 comments on commit f07ef56

Please sign in to comment.