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:
@@ -21,6 +21,18 @@ enum UserSessionCallback {
|
||||
case didReceiveAuthError(isSoftLogout: Bool)
|
||||
}
|
||||
|
||||
enum SessionVerificationState {
|
||||
case unknown
|
||||
case verified
|
||||
case unverified
|
||||
case unverifiedLastSession
|
||||
}
|
||||
|
||||
struct SessionSecurityState: Equatable {
|
||||
let verificationState: SessionVerificationState
|
||||
let recoveryState: SecureBackupRecoveryState
|
||||
}
|
||||
|
||||
protocol UserSessionProtocol {
|
||||
var homeserver: String { get }
|
||||
var userID: String { get }
|
||||
@@ -30,7 +42,7 @@ protocol UserSessionProtocol {
|
||||
var mediaProvider: MediaProviderProtocol { get }
|
||||
var voiceMessageMediaManager: VoiceMessageMediaManagerProtocol { get }
|
||||
|
||||
var sessionVerificationState: CurrentValuePublisher<Bool?, Never> { get }
|
||||
var sessionSecurityStatePublisher: AnyPublisher<SessionSecurityState, Never> { get }
|
||||
var sessionVerificationController: SessionVerificationControllerProxyProtocol? { get }
|
||||
|
||||
var callbacks: PassthroughSubject<UserSessionCallback, Never> { get }
|
||||
|
||||
Reference in New Issue
Block a user