From 5e656a1b8c81a8c528935765da837e83f503b01f Mon Sep 17 00:00:00 2001 From: talksik Date: Tue, 21 Dec 2021 19:52:21 -0800 Subject: [PATCH] intermediary screen instead of jumping around from welcome to circle....waiting on auth to make a complete decision --- nirvana-ios/Services/AuthSessionStore.swift | 3 ++- nirvana-ios/Views/Router/RouterView.swift | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nirvana-ios/Services/AuthSessionStore.swift b/nirvana-ios/Services/AuthSessionStore.swift index f5eea4b..f5cea78 100644 --- a/nirvana-ios/Services/AuthSessionStore.swift +++ b/nirvana-ios/Services/AuthSessionStore.swift @@ -13,6 +13,7 @@ import GoogleSignIn import SwiftUI enum SessionState { + case notCheckedYet case isAuthenticated case isLoggedOut } @@ -29,7 +30,7 @@ protocol SessionStore { final class AuthSessionStore: ObservableObject, SessionStore { @Published var user : User? - @Published var sessionState: SessionState = SessionState.isLoggedOut + @Published var sessionState: SessionState = SessionState.notCheckedYet // TODO: figure out which ones to publish @Published var friendsArr: [User] = [] diff --git a/nirvana-ios/Views/Router/RouterView.swift b/nirvana-ios/Views/Router/RouterView.swift index 89af021..fc28d18 100644 --- a/nirvana-ios/Views/Router/RouterView.swift +++ b/nirvana-ios/Views/Router/RouterView.swift @@ -22,6 +22,8 @@ struct RouterView: View { var body: some View { switch self.authSessionStore.sessionState { + case SessionState.notCheckedYet: + SplashView() case SessionState.isAuthenticated: InnerCircleView() case SessionState.isLoggedOut: