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 input values not maintained #941

Merged

Conversation

Songgyubin
Copy link
Contributor

Issue

Overview (Required)

  • Status management for nickname, occupation, link, and selectedCardType was changed from remember to rememberSaveable. This change ensures that the user-entered values ​​are maintained even when configuration changes such as screen rotation occur.

Movie (Optional)

Before After
Before.webm
After.webm

@Songgyubin
Copy link
Contributor Author

Songgyubin commented Sep 3, 2024

In the case of images, as you mentioned in the issue comment, I used remember out of concern that it would be a burden on SavedInstanceState.

As a solution to this, I also considered preventing automatic activity regeneration on certain configuration changes only when in Edit mode, but I didn't work on it because I couldn't check the side effects for iOS apps.
I also thought about temporarily saving/deleting it locally, but the timing seemed awkward.

It would be better for usability if we could keep the image, but what other solutions are there?

@github-actions github-actions bot temporarily deployed to deploygate-distribution September 3, 2024 08:09 Inactive
@DroidKaigi DroidKaigi deleted a comment from github-actions bot Sep 4, 2024
@takahirom
Copy link
Member

Thank you for your contribution!

@github-actions github-actions bot temporarily deployed to deploygate-distribution September 4, 2024 09:52 Inactive
@takahirom
Copy link
Member

For images, I don't have a solution for this. We could keep them in the rememberRetained scope or somewhere else, but I think this PR is better than what we currently have.

@takahirom takahirom merged commit 3cf0d46 into DroidKaigi:main Sep 4, 2024
6 checks passed
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.

In ProfileCardScreen, edited content disappears when screen size is changed while editing a Profile
2 participants