浏览代码

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

cyBerta 3 年之前
父节点
当前提交
10ffe3d60e
共有 1 个文件被更改,包括 3 次插入1 次删除
  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 {