mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Bot previews
This commit is contained in:
@@ -550,6 +550,10 @@ public final class SparseItemGrid: ASDisplayNode {
|
||||
var offset: CGFloat {
|
||||
return self.scrollView.contentOffset.y
|
||||
}
|
||||
|
||||
var contentBottomOffset: CGFloat {
|
||||
return -self.scrollView.contentOffset.y + self.scrollView.contentSize.height
|
||||
}
|
||||
|
||||
let coveringOffsetUpdated: (Viewport, ContainedViewLayoutTransition) -> Void
|
||||
let offsetUpdated: (Viewport, ContainedViewLayoutTransition) -> Void
|
||||
@@ -1442,6 +1446,10 @@ public final class SparseItemGrid: ASDisplayNode {
|
||||
return self.fromViewport.coveringInsetOffset * (1.0 - self.currentProgress) + self.toViewport.coveringInsetOffset * self.currentProgress
|
||||
}
|
||||
|
||||
var contentBottomOffset: CGFloat {
|
||||
return self.fromViewport.contentBottomOffset * (1.0 - self.currentProgress) + self.toViewport.contentBottomOffset * self.currentProgress
|
||||
}
|
||||
|
||||
var offset: CGFloat {
|
||||
return self.fromViewport.offset * (1.0 - self.currentProgress) + self.toViewport.offset * self.currentProgress
|
||||
}
|
||||
@@ -1632,6 +1640,16 @@ public final class SparseItemGrid: ASDisplayNode {
|
||||
}
|
||||
}
|
||||
|
||||
public var contentBottomOffset: CGFloat {
|
||||
if let currentViewportTransition = self.currentViewportTransition {
|
||||
return currentViewportTransition.contentBottomOffset
|
||||
} else if let currentViewport = self.currentViewport {
|
||||
return currentViewport.contentBottomOffset
|
||||
} else {
|
||||
return 0.0
|
||||
}
|
||||
}
|
||||
|
||||
public var scrollingOffset: CGFloat {
|
||||
if let currentViewportTransition = self.currentViewportTransition {
|
||||
return currentViewportTransition.offset
|
||||
|
||||
Reference in New Issue
Block a user