Repository navigation
Wait for switched user's home settings before fetching data - #1981
Merged
Merged
Conversation
damontecres
added a commit
that referenced
this pull request
Sep 28, 2026
## Description Fixes the home page reloading from scratch when the app is resumed This happened because the `userDto` is updated on app resume and since it has a last accessed timestamp, it would always different and trigger a reload. ### Related issues Bug introduced by #1981 ### Testing Emulator ## Screenshots N/A ## AI or LLM usage None
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
There is a race condition when switching users between
HomeViewModel.initandHomeSetttingsService.loadCurrentSettings. This happens more often if the new user doesn't have a customized home page. The result is that the previous user's home page settings are used for the initial load of the home page.This PR fixes this by collecting the flows for current user & home settings, waiting until both are valid and refer to the same user, then fetch the data.
Related issues
Fixes #1976
Maybe related (and fixes) #1980, but need to investigate more
Testing
Emulator. It's easy to reproduce by adding a manual
delay(2.seconds)at the start ofHomeSetttingsService.loadCurrentSettings.Screenshots
N/A
AI or LLM usage
None