diff --git a/iosApp/iosApp/ContentView.swift b/iosApp/iosApp/ContentView.swift index 3cd4c657..c605573c 100644 --- a/iosApp/iosApp/ContentView.swift +++ b/iosApp/iosApp/ContentView.swift @@ -887,8 +887,8 @@ struct ContentView: View { requiresPIN: profile.hasPin ) StartupContentPrefetcher.prefetchAuthenticatedContent() - await PlayerSettings.shared.refreshFromServer() router.resetToHome() + await PlayerSettings.shared.refreshFromServer() print("[DebugAutoLogin] signed in and selected profile") } catch { print("[DebugAutoLogin] failed: \(error)") diff --git a/iosApp/iosApp/Screens/Profiles/ProfileSelectionViewModel.swift b/iosApp/iosApp/Screens/Profiles/ProfileSelectionViewModel.swift index d6f74cd5..33d07a2a 100644 --- a/iosApp/iosApp/Screens/Profiles/ProfileSelectionViewModel.swift +++ b/iosApp/iosApp/Screens/Profiles/ProfileSelectionViewModel.swift @@ -59,8 +59,11 @@ class ProfileSelectionViewModel { requiresPIN: profile.hasPin ) StartupContentPrefetcher.prefetchAuthenticatedContent() - await PlayerSettings.shared.refreshFromServer() + // Change screens before the settings request suspends. The refresh + // applies this profile's cached playback quality synchronously, + // then updates it from the server while Home is already visible. router.resetToHome() + await PlayerSettings.shared.refreshFromServer() } catch { self.error = ErrorState(error) } @@ -77,8 +80,8 @@ class ProfileSelectionViewModel { requiresPIN: profile.hasPin ) StartupContentPrefetcher.prefetchAuthenticatedContent() - await PlayerSettings.shared.refreshFromServer() router.resetToHome() + await PlayerSettings.shared.refreshFromServer() } /// The picker itself has no active profile, but the server requires the