mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Merge branch 'master' into bazel
This commit is contained in:
@@ -169,6 +169,8 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
||||
}
|
||||
}
|
||||
|
||||
public final var keepMinimalScrollHeightWithTopInset: CGFloat?
|
||||
|
||||
public final var stackFromBottom: Bool = false
|
||||
public final var stackFromBottomInsetItemFactor: CGFloat = 0.0
|
||||
public final var limitHitTestToNodes: Bool = false
|
||||
@@ -987,6 +989,11 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
||||
}
|
||||
}
|
||||
|
||||
if let keepMinimalScrollHeightWithTopInset = self.keepMinimalScrollHeightWithTopInset {
|
||||
completeHeight = max(completeHeight, self.visibleSize.height + keepMinimalScrollHeightWithTopInset)
|
||||
bottomItemEdge = max(bottomItemEdge, topItemEdge + completeHeight)
|
||||
}
|
||||
|
||||
var transition: ContainedViewLayoutTransition = .immediate
|
||||
if let updateSizeAndInsets = updateSizeAndInsets {
|
||||
if !updateSizeAndInsets.duration.isZero && !isExperimentalSnapToScrollToItem {
|
||||
@@ -1384,6 +1391,11 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
||||
completeHeight += itemNode.apparentBounds.height
|
||||
}
|
||||
|
||||
if let keepMinimalScrollHeightWithTopInset = self.keepMinimalScrollHeightWithTopInset {
|
||||
completeHeight = max(completeHeight, self.visibleSize.height + keepMinimalScrollHeightWithTopInset)
|
||||
bottomItemEdge = max(bottomItemEdge, topItemEdge + completeHeight)
|
||||
}
|
||||
|
||||
if self.stackFromBottom {
|
||||
let updatedCompleteHeight = max(completeHeight, self.visibleSize.height)
|
||||
let deltaCompleteHeight = updatedCompleteHeight - completeHeight
|
||||
|
||||
Reference in New Issue
Block a user