| Index: ios/chrome/browser/ui/payments/payment_method_selection_coordinator.mm
|
| diff --git a/ios/chrome/browser/ui/payments/payment_method_selection_coordinator.mm b/ios/chrome/browser/ui/payments/payment_method_selection_coordinator.mm
|
| index b3a15081a4dde6627789a1683b936b39488f06e6..f0e40bfaf0d3f4dffed2315502811a7e09d3baa5 100644
|
| --- a/ios/chrome/browser/ui/payments/payment_method_selection_coordinator.mm
|
| +++ b/ios/chrome/browser/ui/payments/payment_method_selection_coordinator.mm
|
| @@ -7,6 +7,7 @@
|
| #include "components/autofill/core/browser/credit_card.h"
|
| #include "components/strings/grit/components_strings.h"
|
| #include "ios/chrome/browser/payments/payment_request.h"
|
| +#import "ios/chrome/browser/ui/payments/cells/payment_method_item.h"
|
| #include "ios/chrome/browser/ui/payments/payment_method_selection_mediator.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
|
|
| @@ -83,8 +84,16 @@ const int64_t kDelegateNotificationDelayInNanoSeconds = 0.2 * NSEC_PER_SEC;
|
| self.mediator.selectedItemIndex = index;
|
|
|
| DCHECK(index < self.paymentRequest->credit_cards().size());
|
| - [self delayedNotifyDelegateOfSelection:self.paymentRequest
|
| - ->credit_cards()[index]];
|
| + autofill::CreditCard* creditCard = self.paymentRequest->credit_cards()[index];
|
| +
|
| + // Proceed with item selection only if the item has all required info, or
|
| + // else bring up the credit card editor.
|
| + CollectionViewItem<PaymentsIsSelectable>* selectedItem =
|
| + self.mediator.selectableItems[index];
|
| + if (selectedItem.complete)
|
| + [self delayedNotifyDelegateOfSelection:creditCard];
|
| + else
|
| + [self startCreditCardEditCoordinatorWithCreditCard:creditCard];
|
| }
|
|
|
| - (void)paymentRequestSelectorViewControllerDidFinish:
|
|
|