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
|
import SwiftUI
|
||||||
|
|
||||||
enum SessionState {
|
enum SessionState {
|
||||||
|
case notCheckedYet
|
||||||
case isAuthenticated
|
case isAuthenticated
|
||||||
case isLoggedOut
|
case isLoggedOut
|
||||||
}
|
}
|
||||||
@@ -29,7 +30,7 @@ protocol SessionStore {
|
|||||||
|
|
||||||
final class AuthSessionStore: ObservableObject, SessionStore {
|
final class AuthSessionStore: ObservableObject, SessionStore {
|
||||||
@Published var user : User?
|
@Published var user : User?
|
||||||
@Published var sessionState: SessionState = SessionState.isLoggedOut
|
@Published var sessionState: SessionState = SessionState.notCheckedYet
|
||||||
|
|
||||||
// TODO: figure out which ones to publish
|
// TODO: figure out which ones to publish
|
||||||
@Published var friendsArr: [User] = []
|
@Published var friendsArr: [User] = []
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ struct RouterView: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
switch self.authSessionStore.sessionState {
|
switch self.authSessionStore.sessionState {
|
||||||
|
case SessionState.notCheckedYet:
|
||||||
|
SplashView()
|
||||||
case SessionState.isAuthenticated:
|
case SessionState.isAuthenticated:
|
||||||
InnerCircleView()
|
InnerCircleView()
|
||||||
case SessionState.isLoggedOut:
|
case SessionState.isLoggedOut:
|
||||||
|
|||||||
Reference in New Issue
Block a user