Device verification: Improve navigation flow and view states handling.

This commit is contained in:
SBiOSoftWhare
2019-10-23 17:09:58 +02:00
parent 3e4967740b
commit 4d57827363
8 changed files with 54 additions and 17 deletions
@@ -76,6 +76,12 @@ final class DeviceVerificationIncomingViewController: UIViewController {
self.viewModel.viewDelegate = self
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
self.avatarImageView.layer.cornerRadius = avatarImageView.frame.size.width / 2
}
override var preferredStatusBarStyle: UIStatusBarStyle {
return self.theme.statusBarStyle
}
@@ -129,7 +135,6 @@ final class DeviceVerificationIncomingViewController: UIViewController {
avatarImageView.enableInMemoryCache = true
avatarImageView.setImageURI(self.viewModel.avatarUrl, withType: nil, andImageOrientation: .up, previewImage: defaultavatarImage, mediaManager: self.viewModel.mediaManager)
avatarImageView.layer.cornerRadius = avatarImageView.frame.size.width / 2
avatarImageView.clipsToBounds = true
}
@@ -175,6 +180,8 @@ final class DeviceVerificationIncomingViewController: UIViewController {
self.errorPresenter.presentError(from: self, title: "", message: VectorL10n.deviceVerificationCancelledByMe(reason.humanReadable), animated: true) {
self.viewModel.process(viewAction: .cancel)
}
} else {
self.activityPresenter.removeCurrentActivityIndicator(animated: true)
}
}