intermediary screen instead of jumping around from welcome to circle....waiting on auth to make a complete decision
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user