mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix folder preview scrolling
This commit is contained in:
parent
ffbc8883e2
commit
38a29b7801
@ -188,6 +188,7 @@ private final class ChatFolderLinkPreviewScreenComponent: Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var topOffset = -self.scrollView.bounds.minY + itemLayout.topInset
|
var topOffset = -self.scrollView.bounds.minY + itemLayout.topInset
|
||||||
|
if topOffset > 0.0 {
|
||||||
topOffset = max(0.0, topOffset)
|
topOffset = max(0.0, topOffset)
|
||||||
|
|
||||||
if topOffset < topOffsetDistance {
|
if topOffset < topOffsetDistance {
|
||||||
@ -195,6 +196,7 @@ private final class ChatFolderLinkPreviewScreenComponent: Component {
|
|||||||
scrollView.setContentOffset(CGPoint(x: 0.0, y: itemLayout.topInset), animated: true)
|
scrollView.setContentOffset(CGPoint(x: 0.0, y: itemLayout.topInset), animated: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||||
if !self.bounds.contains(point) {
|
if !self.bounds.contains(point) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user