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

Serialize MutableState as a normal JsonObject #1567

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

veyndan
Copy link
Contributor

@veyndan veyndan commented Oct 6, 2023

We don't need to special case it by wrapping it in a custom Saveable object with a boolean flag.

Refs #1384

@veyndan veyndan force-pushed the veyndan/2023-10-06/serialize-mutablestate branch from 345b419 to 3d913f2 Compare October 6, 2023 14:23
@jingwei99
Copy link

did you get to test remembersaveable behaviors after this change in the example app?

@veyndan
Copy link
Contributor Author

veyndan commented Oct 6, 2023

Yep, I tested Emoji Search and the search field is restored

Comment on lines +79 to +80
this is JsonObject && containsKey(MutableStateKey) ->
mutableStateOf(getValue(MutableStateKey).fromJsonElement())

Choose a reason for hiding this comment

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

I see!

@veyndan veyndan merged commit 5c2c4d1 into trunk Oct 6, 2023
@veyndan veyndan deleted the veyndan/2023-10-06/serialize-mutablestate branch October 6, 2023 15:20
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