Skip to content

Commit

Permalink
Rename viewLifecycleOwner -> viewTreeLifecycleOwner
Browse files Browse the repository at this point in the history
  • Loading branch information
jayohms committed Jul 11, 2022
1 parent 99a6353 commit 65fdf16
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ internal class TurboWebFragmentDelegate(
get() = navDestination.delegate().navigator
private val turboView: TurboView?
get() = callback.turboView
private val viewLifecycleOwner
private val viewTreeLifecycleOwner
get() = turboView?.findViewTreeLifecycleOwner()

/**
Expand Down Expand Up @@ -350,13 +350,13 @@ internal class TurboWebFragmentDelegate(
else -> visitOptions
}

viewLifecycleOwner?.lifecycleScope?.launch {
viewTreeLifecycleOwner?.lifecycleScope?.launch {
val snapshot = when (options.action) {
TurboVisitAction.ADVANCE -> fetchCachedSnapshot()
else -> null
}

viewLifecycleOwner?.lifecycle?.whenStateAtLeast(STARTED) {
viewTreeLifecycleOwner?.lifecycle?.whenStateAtLeast(STARTED) {
session().visit(
TurboVisit(
location = location,
Expand Down

0 comments on commit 65fdf16

Please sign in to comment.