diff --git a/voyager-navigator/src/androidMain/kotlin/cafe/adriel/voyager/navigator/NavigatorSaver.android.kt b/voyager-navigator/src/androidMain/kotlin/cafe/adriel/voyager/navigator/NavigatorSaver.android.kt index 9b3526db..65b710d0 100644 --- a/voyager-navigator/src/androidMain/kotlin/cafe/adriel/voyager/navigator/NavigatorSaver.android.kt +++ b/voyager-navigator/src/androidMain/kotlin/cafe/adriel/voyager/navigator/NavigatorSaver.android.kt @@ -8,7 +8,7 @@ import cafe.adriel.voyager.core.screen.Screen * Navigator Saver that forces all Screens be [Parcelable], if not, it will throw a exception while trying to save * the navigator state. */ -public fun parcelableNavigatorSaver(): NavigatorSaver = NavigatorSaver { _, stateHolder, disposeBehavior, parent -> +public fun parcelableNavigatorSaver(): NavigatorSaver = NavigatorSaver { _, key, stateHolder, disposeBehavior, parent -> listSaver( save = { navigator -> val screenAsParcelables = navigator.items.filterIsInstance() @@ -23,7 +23,7 @@ public fun parcelableNavigatorSaver(): NavigatorSaver = NavigatorSaver { _, screenAsParcelables }, - restore = { items -> Navigator(items as List, stateHolder, disposeBehavior, parent) } + restore = { items -> Navigator(items as List, key, stateHolder, disposeBehavior, parent) } ) }