This commit is contained in:
Ali
2023-07-03 02:19:33 +02:00
parent 322c9e5896
commit 4f99fe66df
15 changed files with 663 additions and 189 deletions

View File

@@ -332,7 +332,7 @@ final class NavigationModalContainer: ASDisplayNode, UIScrollViewDelegate, UIGes
transition.updateFrame(node: self.dim, frame: CGRect(origin: CGPoint(), size: layout.size))
self.ignoreScrolling = true
self.scrollNode.view.isScrollEnabled = (layout.inputHeight == nil || layout.inputHeight == 0.0) && self.isInteractiveDimissEnabled
self.scrollNode.view.isScrollEnabled = (layout.inputHeight == nil || layout.inputHeight == 0.0) && self.isInteractiveDimissEnabled && !self.isFlat
let previousBounds = self.scrollNode.bounds
let scrollNodeFrame = CGRect(origin: CGPoint(x: self.horizontalDismissOffset ?? 0.0, y: 0.0), size: layout.size)
self.scrollNode.frame = scrollNodeFrame
@@ -348,7 +348,7 @@ final class NavigationModalContainer: ASDisplayNode, UIScrollViewDelegate, UIGes
}
self.ignoreScrolling = false
self.scrollNode.view.isScrollEnabled = !isStandaloneModal
self.scrollNode.view.isScrollEnabled = !isStandaloneModal && !self.isFlat
let isLandscape = layout.orientation == .landscape
let containerLayout: ContainerViewLayout
@@ -515,6 +515,9 @@ final class NavigationModalContainer: ASDisplayNode, UIScrollViewDelegate, UIGes
if !self.container.bounds.contains(self.view.convert(point, to: self.container.view)) {
return self.dim.view
}
if self.isFlat {
return result
}
var currentParent: UIView? = result
var enableScrolling = true
while true {
@@ -562,7 +565,7 @@ final class NavigationModalContainer: ASDisplayNode, UIScrollViewDelegate, UIGes
enableScrolling = false
}
}
self.scrollNode.view.isScrollEnabled = enableScrolling
self.scrollNode.view.isScrollEnabled = enableScrolling && !self.isFlat
return result
}
}