wolfskin/app/src
Damontecres 32a56e8387
Wait for switched user's home settings before fetching data (#1981)
## Description
There is a race condition when switching users between
`HomeViewModel.init` and `HomeSetttingsService.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 of `HomeSetttingsService.loadCurrentSettings`.

## Screenshots
N/A

## AI or LLM usage
None
2026-09-17 14:41:36 -04:00
..
androidTest/java/com/github/damontecres/wholphin/test Fix issues when the system kills the app during playback (#1116) 2026-03-18 18:09:13 -04:00
appstore Dev: use build product flavors for app store release (#1205) 2026-04-06 15:24:20 -04:00
debug/res/values Dev: use build product flavors for app store release (#1205) 2026-04-06 15:24:20 -04:00
main Wait for switched user's home settings before fetching data (#1981) 2026-09-17 14:41:36 -04:00
test Update intent parsing to allow for user switching to home page (#1962) 2026-09-15 13:07:08 -04:00