mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Animation and cleanup
This commit is contained in:
parent
dda6054ef1
commit
1c27b2c426
26 changed files with 33 additions and 3906 deletions
|
|
@ -2671,6 +2671,22 @@ open class ListViewImpl: ASDisplayNode, ListView, ASScrollViewDelegate, ASGestur
|
|||
return value
|
||||
}
|
||||
|
||||
public func isStrictlyScrolledToPinToEdgeItem() -> Bool {
|
||||
if self.calculatePinToEdgeTopInset() <= 0.0 {
|
||||
return false
|
||||
}
|
||||
guard let targetIndex = self.items.firstIndex(where: { $0.pinToEdgeWithInset }) else {
|
||||
return false
|
||||
}
|
||||
for itemNode in self.itemNodes {
|
||||
if itemNode.index == targetIndex {
|
||||
let expectedMaxY = (self.visibleSize.height - self.insets.bottom) + itemNode.scrollPositioningInsets.bottom
|
||||
return abs(itemNode.apparentFrame.maxY - expectedMaxY) < 0.5
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
private func replayOperations(animated: Bool, animateAlpha: Bool, animateCrossfade: Bool, animateFullTransition: Bool, customAnimationTransition: ControlledTransition?, synchronous: Bool, synchronousLoads: Bool, animateTopItemVerticalOrigin: Bool, operations: [ListViewStateOperation], requestItemInsertionAnimationsIndices: Set<Int>, scrollToItem originalScrollToItem: ListViewScrollToItem?, additionalScrollDistance: CGFloat, updateSizeAndInsets: ListViewUpdateSizeAndInsets?, stationaryItemIndex: Int?, updateOpaqueState: Any?, forceInvertOffsetDirection: Bool = false, completion: () -> Void) {
|
||||
var scrollToItem: ListViewScrollToItem?
|
||||
var isExperimentalSnapToScrollToItem = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue