mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Merge pull request #3557 from vector-im/element_3556
Gracefully cancel verification on iOS 13 drag gesture
This commit is contained in:
commit
e27f735f7d
2 changed files with 14 additions and 1 deletions
|
@ -15,6 +15,7 @@ Bugfix:
|
|||
* Avoid email validation link to redirect to web app (#3513).
|
||||
* Wait for first sync complete before stopping loading screen (#3336).
|
||||
* Disable key backup on extensions (#3371).
|
||||
* Gracefully cancel verification on iOS 13 drag gesture (#3556).
|
||||
|
||||
API Change:
|
||||
*
|
||||
|
|
|
@ -128,7 +128,9 @@ final class KeyVerificationCoordinatorBridgePresenter: NSObject {
|
|||
|
||||
private func present(coordinator keyVerificationCoordinator: KeyVerificationCoordinator, from viewController: UIViewController, animated: Bool) {
|
||||
keyVerificationCoordinator.delegate = self
|
||||
viewController.present(keyVerificationCoordinator.toPresentable(), animated: animated, completion: nil)
|
||||
let presentable = keyVerificationCoordinator.toPresentable()
|
||||
presentable.presentationController?.delegate = self
|
||||
viewController.present(presentable, animated: animated, completion: nil)
|
||||
keyVerificationCoordinator.start()
|
||||
|
||||
self.coordinator = keyVerificationCoordinator
|
||||
|
@ -146,3 +148,13 @@ extension KeyVerificationCoordinatorBridgePresenter: KeyVerificationCoordinatorD
|
|||
self.delegate?.keyVerificationCoordinatorBridgePresenterDelegateDidCancel(self)
|
||||
}
|
||||
}
|
||||
|
||||
extension KeyVerificationCoordinatorBridgePresenter: UIAdaptivePresentationControllerDelegate {
|
||||
|
||||
func presentationControllerDidDismiss(_ presentationController: UIPresentationController) {
|
||||
if let coordinator = self.coordinator {
|
||||
keyVerificationCoordinatorDidCancel(coordinator)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue