Files
letro-ios/ElementX/Sources/Screens/SecureBackup/SecureBackupLogoutConfirmationScreen/SecureBackupLogoutConfirmationScreenModels.swift
Doug b1b2b6bf8a Show internet connection warning when uploading keys on log out. (#4027)
* Show the key upload progress when waiting to log out.

Add some basic view model tests too.

* Show a network suggestion if key upload doesn't report any progress during logout.
2025-04-15 16:47:31 +01:00

41 lines
1.0 KiB
Swift

//
// Copyright 2022-2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
// Please see LICENSE files in the repository root for full details.
//
import Foundation
enum SecureBackupLogoutConfirmationScreenViewModelAction {
case cancel
case settings
case logout
}
enum SecureBackupLogoutConfirmationScreenViewMode: Equatable {
case saveRecoveryKey
case waitingToStart(hasStalled: Bool)
case backupOngoing(progress: Double)
case offline
}
struct SecureBackupLogoutConfirmationScreenViewState: BindableState {
var mode: SecureBackupLogoutConfirmationScreenViewMode
var bindings = SecureBackupLogoutConfirmationScreenBindings()
}
struct SecureBackupLogoutConfirmationScreenBindings {
var alertInfo: AlertInfo<SecureBackupLogoutConfirmationScreenAlertType>?
}
enum SecureBackupLogoutConfirmationScreenAlertType {
case backupUploadFailed
}
enum SecureBackupLogoutConfirmationScreenViewAction {
case cancel
case settings
case logout
}