Device Verification: Display a message when the transaction has been automatically cancelled

This commit is contained in:
manuroe
2019-04-17 13:05:18 +02:00
parent 873d674267
commit f2fc4a1f28
5 changed files with 24 additions and 2 deletions
@@ -175,7 +175,13 @@ final class DeviceVerificationVerifyViewController: UIViewController {
}
private func renderCancelledByMe(reason: MXTransactionCancelCode) {
// TODO
if reason.value != MXTransactionCancelCode.user().value {
self.activityPresenter.removeCurrentActivityIndicator(animated: true)
self.errorPresenter.presentError(from: self, title: "", message: VectorL10n.deviceVerificationCancelledByMe(reason.humanReadable), animated: true) {
self.viewModel.process(viewAction: .cancel)
}
}
}
private func render(error: Error) {