diff --git a/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSessionNavHostFragment.kt b/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSessionNavHostFragment.kt index 87a753dd..2385ac2e 100644 --- a/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSessionNavHostFragment.kt +++ b/turbo/src/main/kotlin/dev/hotwire/turbo/session/TurboSessionNavHostFragment.kt @@ -43,10 +43,12 @@ abstract class TurboSessionNavHostFragment : NavHostFragment() { } fun reset(onReset: () -> Unit = {}) { - currentNavDestination.clearBackStack { - session.reset() - initControllerGraph() - onReset() + currentNavDestination.delegate().navigator.onNavigationVisit { + currentNavDestination.clearBackStack { + session.reset() + initControllerGraph() + onReset() + } } }