After a recent PR, the confirmation flow on the second screen became unstable. Users report that after completing the action, the order list does not always refresh, and sometimes the app opens a new screen instead of returning back.
CheckoutFragment screen opens ConfirmFragment to confirm the order.ConfirmFragment must:
savedStateHandle of the previous back stack entry under the checkout_result key;CheckoutFragment.CheckoutFragment must handle the result exactly once:
Order confirmed;confirmed.CheckoutFragment into STARTED without a new confirmation must not reprocess the old result.CheckoutFragment.ConfirmFragment.Confirm button.CheckoutFragment within the same process.Confirm, the app returns to CheckoutFragment instead of opening the next screen.CheckoutFragment receives the result from ConfirmFragment through the savedStateHandle of the previous back stack entry.STARTED without a new result, the old confirmation is not processed again.1.8.22.8.02.8.41.8.1NavHostFragment is used, and the process is not killed between reproduction stepsSavedStateHandle.getStateFlow(...) on currentBackStackEntry in CheckoutFragmentUse line comments to explain the problem, its impact, the fix and how to test it.