Skip to content

Commit

Permalink
Merge pull request #225 from hotwired/navhost-reset
Browse files Browse the repository at this point in the history
Post to the message queue when resetting a NavHostFragment
  • Loading branch information
jayohms authored Apr 28, 2022
2 parents e659f08 + fb62287 commit 0d8aeab
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ abstract class TurboSessionNavHostFragment : NavHostFragment() {
currentNavDestination.clearBackStack {
session.reset()
initControllerGraph()
onReset()

if (view == null) {
onReset()
} else {
requireView().post { onReset() }
}
}
}
}
Expand Down

0 comments on commit 0d8aeab

Please sign in to comment.