another.im-ios/ConversationsClassic/AppCore/State/AppState.swift
2024-06-19 17:15:27 +02:00

35 lines
683 B
Swift

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()
}
}