Skip to content

Commit 77ba379

Browse files
committed
Replace push with new root
1 parent 4b2243c commit 77ba379

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • samples/sandbox/src/main/kotlin/com/bumble/appyx/sandbox/client/explicitnavigation

samples/sandbox/src/main/kotlin/com/bumble/appyx/sandbox/client/explicitnavigation/RootNode.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import com.bumble.appyx.core.modality.BuildContext
1919
import com.bumble.appyx.core.node.ParentNode
2020
import com.bumble.appyx.core.plugin.Plugin
2121
import com.bumble.appyx.navmodel.backstack.BackStack
22+
import com.bumble.appyx.navmodel.backstack.operation.newRoot
2223
import com.bumble.appyx.navmodel.backstack.operation.pop
2324
import com.bumble.appyx.navmodel.backstack.operation.push
2425
import com.bumble.appyx.sandbox.client.explicitnavigation.RootNode.NavTarget
@@ -44,7 +45,7 @@ class RootNode(
4445
suspend fun waitForChildTwoAttached() = waitForChildAttached<ChildNodeTwo>()
4546

4647
suspend fun attachChildOne() = attachChild<ChildNodeOne> {
47-
backStack.push(ChildOne)
48+
backStack.newRoot(ChildOne)
4849
}
4950

5051
suspend fun attachChildTwo() = attachChild<ChildNodeTwo> {

0 commit comments

Comments
 (0)