-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#310] Ensure NavTarget and State are parcelable #311
base: 1.x
Are you sure you want to change the base?
[#310] Ensure NavTarget and State are parcelable #311
Conversation
libraries/core/src/main/kotlin/com/bumble/appyx/core/navigation/transition/CombinedHandler.kt
Fixed
Show fixed
Hide fixed
e2a15d0
to
42297c6
Compare
@@ -15,14 +17,20 @@ class IndexedBackStack<NavTarget : Any>( | |||
savedStateMap = savedState | |||
) { | |||
|
|||
sealed interface State { | |||
sealed interface State : Parcelable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bug introduced due to a lack of compile-time contracts
42297c6
to
9806dbe
Compare
This is definitely a breaking change. We can likely fix the problems (samples that do not use Parcelable) in a different PR, but I think it's worthwhile adding this to avoid issues in the future |
If we don't want to go down this path (I don't see why we shouldn't, other than the fact that we have to make the enums parcelable), we MAY be able to solve this with a |
The original intention was to allow different types like primitives and serialisables. We can potentially introduce runtime checks Not against your approach. |
@CherryPerry that could be a good alternative as well. Let's discuss tomorrow! |
Description
Fixes #310
Check list
CHANGELOG.md
if required.