Merge branch 'master' into bazel

This commit is contained in:
Ali
2020-02-19 15:37:48 +04:00
49 changed files with 2020 additions and 334 deletions

View File

@@ -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