Skip to content
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

Fix list encoding #4

Merged
merged 1 commit into from Mar 4, 2021
Merged

Fix list encoding #4

merged 1 commit into from Mar 4, 2021

Conversation

Starmel
Copy link
Contributor

@Starmel Starmel commented Mar 3, 2021

Problem:

In current version, encoding of top level List structure can't be decoded because don't contains size field.

Example:

// Exists items in adapter. 
val bundle = adapter.items.bundle(ListSerializer(Item.serializer()))

val items = state.unbundle(ListSerializer(Item.serializer()))
// items size = 0

Solution:

Moved adding size key to before keyInParent to fix issue. I don't sure what nothing was not broken by this change, please verify solution.

@AhmedMourad0
Copy link
Owner

AhmedMourad0 commented Mar 3, 2021

Thank you for filing this issue and PR, I'll be looking into it very shortly.

@AhmedMourad0 AhmedMourad0 merged commit f7a75be into AhmedMourad0:master Mar 4, 2021
AhmedMourad0 added a commit that referenced this pull request Mar 4, 2021
@AhmedMourad0 AhmedMourad0 added bug Something isn't working good first issue Good for newcomers labels Mar 4, 2021
@AhmedMourad0 AhmedMourad0 self-assigned this Mar 4, 2021
@AhmedMourad0
Copy link
Owner

The fix is now available starting from v0.5.0 , Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants