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

Always observe fragmentConfig #4034

Merged
merged 1 commit into from
Jul 21, 2021
Merged

Always observe fragmentConfig #4034

merged 1 commit into from
Jul 21, 2021

Conversation

brnunes-stripe
Copy link
Contributor

@brnunes-stripe brnunes-stripe commented Jul 21, 2021

Summary

BaseSheetViewModel.fetchFragmentConfig() was creating a new MutableLiveData every time it was called, and was called only on the first onCreate.
Make it a val so that it's only created once and survives configuration changes.

Motivation

Fix #3878.

Testing

  • Added tests
  • Modified tests
  • Manually verified

@brnunes-stripe brnunes-stripe merged commit 0d88668 into master Jul 21, 2021
@brnunes-stripe brnunes-stripe deleted the brnunes/bugfix branch July 21, 2021 17:44
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.

[BUG] PaymentSheetActivity.fetchConfig() race condition when activity recreates
2 participants