mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Show recovery instead of verification if this is the last session and recovery is set up
* Show recovery instead of verification if this is the last session and recovery is set up * Rename `recoveryKeyState` to `recoveryState` * Remove duplicates on session security state changes. * Fix missing "Save recovery key" button * Fix unit tests * Rename `isLastDevice` to `isOnlyDeviceLeft` * Address PR comments
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import Combine
|
||||
import Foundation
|
||||
|
||||
enum SecureBackupRecoveryKeyState {
|
||||
enum SecureBackupRecoveryState {
|
||||
case unknown
|
||||
case disabled
|
||||
case enabled
|
||||
@@ -50,7 +50,7 @@ enum SecureBackupControllerError: Error {
|
||||
|
||||
// sourcery: AutoMockable
|
||||
protocol SecureBackupControllerProtocol {
|
||||
var recoveryKeyState: CurrentValuePublisher<SecureBackupRecoveryKeyState, Never> { get }
|
||||
var recoveryState: CurrentValuePublisher<SecureBackupRecoveryState, Never> { get }
|
||||
|
||||
var keyBackupState: CurrentValuePublisher<SecureBackupKeyBackupState, Never> { get }
|
||||
|
||||
@@ -60,7 +60,5 @@ protocol SecureBackupControllerProtocol {
|
||||
func generateRecoveryKey() async -> Result<String, SecureBackupControllerError>
|
||||
func confirmRecoveryKey(_ key: String) async -> Result<Void, SecureBackupControllerError>
|
||||
|
||||
func isLastSession() async -> Result<Bool, SecureBackupControllerError>
|
||||
|
||||
func waitForKeyBackupUpload() async -> Result<Void, SecureBackupControllerError>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user