File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/orders Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ fun WooPosIssueRefundDialog(
6363
6464 val handleDismiss = {
6565 if (viewModel.onDismissRequest()) {
66+ viewModel.onUIEvent(WooPosRefundUIEvent .DialogDismissed )
6667 onDismissRequest()
6768 }
6869 }
Original file line number Diff line number Diff line change @@ -123,12 +123,11 @@ class WooPosRefundViewModel @AssistedInject constructor(
123123 when (event) {
124124 WooPosRefundUIEvent .DialogDismissed -> {
125125 val currentState = _state .value
126- val isProcessing = currentState is WooPosRefundState .Content &&
127- currentState.step == WooPosRefundState .Content .RefundStep .Processing
128126
129- // Only reset state if not processing (i.e., dismissal was allowed)
130- if (! isProcessing) {
131- loadRefundableItems()
127+
128+ if (currentState is WooPosRefundState .Content &&
129+ currentState.step != WooPosRefundState .Content .RefundStep .Processing ) {
130+ _state .value = currentState.copy(step = WooPosRefundState .Content .RefundStep .SelectItems )
132131 }
133132 }
134133 else -> {
You can’t perform that action at this time.
0 commit comments