Skip to content

Commit

Permalink
fix: ensure proper cleanup of TransactionStateFragment (#5206)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeniorZhai authored Dec 20, 2024
1 parent 0c6e76a commit 5d966de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ class UnstakeFragment : BaseFragment() {
setCloseAction {
parentFragmentManager.popBackStackImmediate()
parentFragmentManager.popBackStackImmediate()
parentFragmentManager.findFragmentByTag(TransactionStateFragment.TAG)?.let { fragment ->
parentFragmentManager.beginTransaction().remove(fragment).commitNowAllowingStateLoss()
}
}
}
navTo(txStateFragment, TransactionStateFragment.TAG)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ class SwapFragment : BaseFragment() {
setCloseAction {
navigateUp(navController)
parentFragmentManager.popBackStackImmediate()
parentFragmentManager.findFragmentByTag(TransactionStateFragment.TAG)?.let { fragment ->
parentFragmentManager.beginTransaction().remove(fragment).commitNowAllowingStateLoss()
}
}
}
navTo(txStateFragment, TransactionStateFragment.TAG)
Expand Down

0 comments on commit 5d966de

Please sign in to comment.