wolfskin/app
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
..
config Add experimental MPV player backend (#161) 2025-11-16 18:46:25 -05:00
schemas/com.github.damontecres.wholphin.data.AppDatabase Add option to override user profile settings for audio & subtitle languages (#1680) 2026-07-14 14:17:31 -04:00
src Wait for switched user's home settings before fetching data (#1981) 2026-09-17 14:41:36 -04:00
.gitignore Set update URL (#8) 2025-10-15 17:17:16 -04:00
build.gradle.kts Update API level to Android 17 (#1908) 2026-08-29 21:35:58 -04:00
proguard-rules.pro Fix subtitle outline width not applying in release builds (#1687) 2026-07-11 13:21:41 -04:00