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,11 +188,13 @@ private final class ChatFolderLinkPreviewScreenComponent: Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var topOffset = -self.scrollView.bounds.minY + itemLayout.topInset
|
var topOffset = -self.scrollView.bounds.minY + itemLayout.topInset
|
||||||
topOffset = max(0.0, topOffset)
|
if topOffset > 0.0 {
|
||||||
|
topOffset = max(0.0, topOffset)
|
||||||
if topOffset < topOffsetDistance {
|
|
||||||
targetContentOffset.pointee.y = scrollView.contentOffset.y
|
if topOffset < topOffsetDistance {
|
||||||
scrollView.setContentOffset(CGPoint(x: 0.0, y: itemLayout.topInset), animated: true)
|
targetContentOffset.pointee.y = scrollView.contentOffset.y
|
||||||
|
scrollView.setContentOffset(CGPoint(x: 0.0, y: itemLayout.topInset), animated: true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user