mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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:
@@ -166,6 +166,16 @@ class ClientProxy: ClientProxyProtocol {
|
||||
let digest = SHA256.hash(data: data)
|
||||
return digest.compactMap { String(format: "%02x", $0) }.joined()
|
||||
}()
|
||||
|
||||
func isOnlyDeviceLeft() async -> Result<Bool, ClientProxyError> {
|
||||
do {
|
||||
let result = try await client.encryption().isLastDevice()
|
||||
return .success(result)
|
||||
} catch {
|
||||
MXLog.error("Failed checking isLastDevice with error: \(error)")
|
||||
return .failure(.failedCheckingIsLastDevice(error))
|
||||
}
|
||||
}
|
||||
|
||||
func startSync() {
|
||||
guard !hasEncounteredAuthError else {
|
||||
|
||||
Reference in New Issue
Block a user