another.im-ios/ConversationsClassic/AppCore/State/AppState.swift

35 lines
683 B
Swift
Raw Normal View History

2024-06-19 15:15:27 +00:00
import Foundation
enum AppFlow: Codable {
case start
case accounts
case chats
case contacts
case settings
}
struct AppState: Stateable {
var appVersion: String
var previousFlow: AppFlow
var currentFlow: AppFlow
var startState: StartState
var accountsState: AccountsState
var rostersState: RostersState
var chatsState: ChatsState
}
// MARK: Init
extension AppState {
init() {
appVersion = Const.appVersion
previousFlow = .start
currentFlow = .start
startState = StartState()
accountsState = AccountsState()
rostersState = RostersState()
chatsState = ChatsState()
}
}