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

Don't ignore writing to disk on configuration changes #45

Merged
merged 1 commit into from
May 30, 2019

Conversation

byencho
Copy link

@byencho byencho commented May 30, 2019

This PR fixes a subtle bug in which onSaveInstanceState might get called during a configuration change without a corresponding call to onCreate if a Fragment is backgrounded. This would result in a lack of data if you killed the app, returned, and then navigated back. Rather than declining to write data to disk during a configuration change, we'll treat it as the app being in the foreground...this way we still write on a background thread, so we still get the same performance improvement.

@byencho byencho merged commit 4aff8cb into master May 30, 2019
@byencho
Copy link
Author

byencho commented May 30, 2019

Thanks @weisers and @dperez37

@byencho byencho deleted the fix-rotation-clearing-issue branch May 30, 2019 21:50
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.

4 participants