Fix for Region for Trending
dropdown not populating
#2737
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for
Region for Trending
dropdown not populatingPull Request Type
Related issue
#1644
Description
This PR aims to fix an issue with the
Region for Trending
dropdown not populating with data before the user changes thecurrentLocale
.Screenshots
Before:
After:
Testing
settings.db
file (I believe it is located in theElectron
roaming directory when debugging)Region for Trending
dropdown in settingsDesktop (please complete the following information):
Additional Information
An alternative solution might be to add an additional call to
getRegionData
somewhere; however, it may be difficult to tell ifgetRegionData
has already been called recently without introducing a race condition. That could causegetRegionData
to be called twice in a row. The reason I went with this solution was because this issue goes away when all of the side effects are evaluated on app mounted.