intermediary screen instead of jumping around from welcome to circle....waiting on auth to make a complete decision

This commit is contained in:
talksik
2021-12-21 19:52:21 -08:00
parent 5cf78c2cdc
commit 5e656a1b8c
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -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] = []
@@ -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: