mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Fix folder preview scrolling
This commit is contained in:
@@ -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 {
|
if topOffset < topOffsetDistance {
|
||||||
targetContentOffset.pointee.y = scrollView.contentOffset.y
|
targetContentOffset.pointee.y = scrollView.contentOffset.y
|
||||||
scrollView.setContentOffset(CGPoint(x: 0.0, y: itemLayout.topInset), animated: true)
|
scrollView.setContentOffset(CGPoint(x: 0.0, y: itemLayout.topInset), animated: true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user