mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Only offer to verify if a cross-signed device is available and improve the UX whilst waiting. (#4710)
* Only offer to verify if a cross-signed device is available * Wait until we know which verification options are available before showing them. --------- Co-authored-by: Hubert Chathi <hubertc@matrix.org>
This commit is contained in:
@@ -342,6 +342,16 @@ class ClientProxy: ClientProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func hasDevicesToVerifyAgainst() async -> Result<Bool, ClientProxyError> {
|
||||
do {
|
||||
let result = try await client.encryption().hasDevicesToVerifyAgainst()
|
||||
return .success(result)
|
||||
} catch {
|
||||
MXLog.error("Failed checking hasDevicesToVerifyAgainst with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
}
|
||||
|
||||
func startSync() {
|
||||
guard !hasEncounteredAuthError else {
|
||||
MXLog.warning("Ignoring request, this client has an unknown token.")
|
||||
|
||||
Reference in New Issue
Block a user