Skip to content

Commit

Permalink
fix: revise enabling submit button
Browse files Browse the repository at this point in the history
  • Loading branch information
nuxzero committed Sep 21, 2023
1 parent ae9a4cc commit 937a9cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class CreditCardActivity : OmiseActivity() {

private fun updateSubmitButton() {
val isFormValid = editTexts.filterKeys {
if (!isBillingAddressRequired()) !billingAddressEditTexts.contains(it)
if (!isBillingAddressRequired()) !billingAddressEditTexts.containsKey(it)
else true
}.map { (editText, _) -> editText.isValid }.reduce { acc, b -> acc && b }
submitButton.isEnabled = isFormValid
Expand Down

0 comments on commit 937a9cb

Please sign in to comment.