Skip to content

Conversation

makeevrserg
Copy link
Member

Background

Right now crash can happen after configuration restored from backstack because ImmutableList doesn't have serialization strategy

Changes

  • This PR added custom internal serializer for ImmutableList<String>

Test plan

  • Open flipper screenshotspreview
  • Share screenshot somewhere so another app appears
  • Go back to flipper and see restored state

@makeevrserg makeevrserg requested a review from LionZXY as a code owner April 18, 2024 16:06
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder

internal class ImmutableListSerializer<T>(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can stay with this or either wait for Kotlin/kotlinx.collections.immutable#179 if it ever will be reviewed

@flipperdevices flipperdevices deleted a comment Apr 19, 2024
@LionZXY LionZXY merged commit 91511b0 into flipperdevices:dev Apr 19, 2024
@makeevrserg makeevrserg deleted the fix/immutable-list-serializer branch August 17, 2024 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants