You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
703 B
28 lines
703 B
//
|
|
// AppState.swift
|
|
// AllIn
|
|
//
|
|
// Created by Emre on 17/12/2023.
|
|
//
|
|
|
|
import SwiftUI
|
|
import Model
|
|
|
|
class AppStateContainer: ObservableObject {
|
|
static let shared = AppStateContainer()
|
|
let loggedState: LoggedState = LoggedState()
|
|
var onlineStatus: OnlineStatus = OnlineStatus()
|
|
var notificationState: NotificationService = NotificationService()
|
|
@Published var user: User?
|
|
|
|
@AppStorage("authenticationRefresh", store: UserDefaults(suiteName: "group.alldev.AllIn")!) var authenticationRefresh: String?
|
|
}
|
|
|
|
class LoggedState: ObservableObject {
|
|
@Published var connectedUser: Bool = false
|
|
}
|
|
|
|
class OnlineStatus: ObservableObject {
|
|
@Published var isOnline: Bool = true
|
|
}
|