mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
MESSENGER-5271 crosssigning - add alert and better strings, only show button when usable
This commit is contained in:
+14
@@ -83,6 +83,18 @@ final class KeyVerificationSelfVerifyWaitViewModel: KeyVerificationSelfVerifyWai
|
||||
}
|
||||
}
|
||||
|
||||
// bwi: only show corsssigning button when there is more than one device in your account
|
||||
func checkCrosssigningDevices() {
|
||||
self.session.matrixRestClient.devices { [weak self] response in
|
||||
switch response {
|
||||
case .success(let devices):
|
||||
self?.update(viewState: .crosssigningPossible(devices.count > 1))
|
||||
case .failure:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func loadData() {
|
||||
@@ -258,6 +270,8 @@ final class KeyVerificationSelfVerifyWaitViewModel: KeyVerificationSelfVerifyWai
|
||||
}
|
||||
|
||||
if keyVerificationRequest.state == MXKeyVerificationRequestStateReady {
|
||||
self.update(viewState: .verificationAccepted)
|
||||
|
||||
self.unregisterKeyVerificationRequestChangeNotification()
|
||||
self.coordinatorDelegate?.keyVerificationSelfVerifyWaitViewModel(self,
|
||||
didAcceptKeyVerificationRequest: keyVerificationRequest)
|
||||
|
||||
Reference in New Issue
Block a user