mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
no message
This commit is contained in:
@@ -249,7 +249,7 @@ final class GalleryThumbnailContainerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
|
||||
if scrollView.isDragging || scrollView.isDecelerating {
|
||||
let position = scrollView.contentInset.left + scrollView.contentOffset.x
|
||||
let index = max(0, min(self.items.count, Int(round(position / (itemBaseSize.width + spacing)))))
|
||||
let index = max(0, min(self.items.count - 1, Int(round(position / (itemBaseSize.width + spacing)))))
|
||||
|
||||
if let (currentCentralIndex, _) = self.centralIndexAndProgress, currentCentralIndex != index {
|
||||
self.centralIndexAndProgress = (index, nil)
|
||||
|
||||
Reference in New Issue
Block a user