Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.bumble.appyx.app.node.backstack

import android.os.Parcelable
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
Expand Down Expand Up @@ -30,6 +31,7 @@ import com.bumble.appyx.core.node.Node
import com.bumble.appyx.core.node.ParentNode
import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive
import kotlinx.parcelize.Parcelize

class InsideTheBackStack(
buildContext: BuildContext,
Expand Down Expand Up @@ -61,7 +63,8 @@ class InsideTheBackStack(
}
}

sealed class NavTarget {
sealed class NavTarget : Parcelable {
@Parcelize
data class Child(val index: Int) : NavTarget() {
override fun toString(): String = index.toString()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.bumble.appyx.app.node.backstack.app.indexedbackstack

import android.os.Parcelable
import com.bumble.appyx.core.navigation.BaseNavModel
import com.bumble.appyx.core.navigation.NavElements
import com.bumble.appyx.core.navigation.NavKey
import com.bumble.appyx.core.navigation.Operation
import com.bumble.appyx.core.state.SavedStateMap
import kotlinx.parcelize.Parcelize

class IndexedBackStack<NavTarget : Any>(
savedState: SavedStateMap?,
Expand All @@ -15,14 +17,20 @@ class IndexedBackStack<NavTarget : Any>(
savedStateMap = savedState
) {

sealed interface State {
sealed interface State : Parcelable {
@Parcelize
object Created : State

@Parcelize
object Active : State
class Stashed(

@Parcelize
data class Stashed(
val index: Int,
val size: Int
) : State

@Parcelize
object Destroyed : State
}

Expand Down