Skip to content

Commit 6c81716

Browse files
committed
9582 Avoid delay in badging set up tap to pay row
1 parent a2587c9 commit 6c81716

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/InPersonPaymentsMenuViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,10 @@ private extension InPersonPaymentsMenuViewController {
424424

425425
viewModel.$shouldBadgeTapToPayOnIPhone.sink { [weak self] _ in
426426
self?.configureSections()
427-
self?.tableView.reloadData()
427+
// ensures that the cell will be configured with the correct value for the badge
428+
DispatchQueue.main.async {
429+
self?.tableView.reloadData()
430+
}
428431
}.store(in: &cancellables)
429432
}
430433

WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/InPersonPaymentsMenuViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ final class InPersonPaymentsMenuViewModel {
3939

4040
@Published private(set) var isEligibleForTapToPayOnIPhone: Bool = false
4141
@Published private(set) var shouldShowTapToPayOnIPhoneFeedbackRow: Bool = false
42-
@Published private(set) var shouldBadgeTapToPayOnIPhone: Bool
42+
@Published private(set) var shouldBadgeTapToPayOnIPhone: Bool = false
4343

4444
let cardPresentPaymentsConfiguration: CardPresentPaymentsConfiguration
4545

0 commit comments

Comments
 (0)