Răsfoiți Sursa

don't allow swipe to navigate back in WebxdcViewController, because the gesture interferes with interactions in webxdcs (for example in games) (#1599)

cyBerta 3 ani în urmă
părinte
comite
10ffe3d60e
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      deltachat-ios/Controller/WebxdcViewController.swift

+ 3 - 1
deltachat-ios/Controller/WebxdcViewController.swift

@@ -168,7 +168,9 @@ class WebxdcViewController: WebViewViewController {
     
     override func willMove(toParent parent: UIViewController?) {
         super.willMove(toParent: parent)
-        if parent == nil {
+        let willBeRemoved = parent == nil
+        navigationController?.interactivePopGestureRecognizer?.isEnabled = willBeRemoved
+        if willBeRemoved {
             // remove observer
             let nc = NotificationCenter.default
             if let webxdcUpdateObserver = webxdcUpdateObserver {