Skip to content

Commit 0851c3a

Browse files
committed
Disable view actions in summary screen while network happens
1 parent f9bd2d9 commit 0851c3a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

WooCommerce/Classes/ViewRelated/Orders/Simple Payments/Summary/SimplePaymentsSummary.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ struct SimplePaymentsSummary: View {
5959
viewModel.reloadContent()
6060
}, viewModel: viewModel.noteViewModel)
6161
}
62+
.disabled(viewModel.disableViewActions)
6263
}
6364
}
6465

WooCommerce/Classes/ViewRelated/Orders/Simple Payments/Summary/SimplePaymentsSummaryViewModel.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ final class SimplePaymentsSummaryViewModel: ObservableObject {
4646
noteViewModel.newNote
4747
}
4848

49+
/// Disable view actions while a network request is being performed
50+
///
51+
var disableViewActions: Bool {
52+
return showLoadingIndicator
53+
}
54+
4955
/// Total to charge with taxes.
5056
///
5157
private let totalWithTaxes: String

0 commit comments

Comments
 (0)