mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Device Verification: Display the "The other party cancelled the verification." modal
This commit is contained in:
@@ -66,21 +66,26 @@ final class DeviceVerificationVerifyViewModel: DeviceVerificationVerifyViewModel
|
||||
func process(viewAction: DeviceVerificationVerifyViewAction) {
|
||||
switch viewAction {
|
||||
case .confirm:
|
||||
self.confirm()
|
||||
self.confirmTransaction()
|
||||
case .complete:
|
||||
self.coordinatorDelegate?.deviceVerificationVerifyViewModelDidComplete(self)
|
||||
case .cancel:
|
||||
self.cancelTransaction()
|
||||
self.coordinatorDelegate?.deviceVerificationVerifyViewModelDidCancel(self)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func confirm() {
|
||||
private func confirmTransaction() {
|
||||
self.update(viewState: .loading)
|
||||
|
||||
self.transaction.confirmSASMatch()
|
||||
}
|
||||
|
||||
private func cancelTransaction() {
|
||||
self.transaction.cancel(with: MXTransactionCancelCode.user())
|
||||
}
|
||||
|
||||
private func update(viewState: DeviceVerificationVerifyViewState) {
|
||||
self.viewDelegate?.deviceVerificationVerifyViewModel(self, didUpdateViewState: viewState)
|
||||
|
||||
Reference in New Issue
Block a user