mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix first tab ready
This commit is contained in:
parent
fe373b505f
commit
3f46aeac43
@ -977,6 +977,7 @@ public final class ChatListContainerNode: ASDisplayNode, UIGestureRecognizerDele
|
||||
return
|
||||
}
|
||||
let _ = self
|
||||
//let _ = self.contentScrollingEnded?(self.currentItemNode)
|
||||
}
|
||||
itemNode.listNode.contentScrollingEnded = { [weak self] listView in
|
||||
guard let self else {
|
||||
@ -1441,7 +1442,7 @@ public final class ChatListContainerNode: ASDisplayNode, UIGestureRecognizerDele
|
||||
self?.filterEmptyAction(filter)
|
||||
}, secondaryEmptyAction: { [weak self] in
|
||||
self?.secondaryEmptyAction()
|
||||
}, autoSetReady: false)
|
||||
}, autoSetReady: !animated)
|
||||
let disposable = MetaDisposable()
|
||||
self.pendingItemNode = (id, itemNode, disposable)
|
||||
|
||||
|
@ -4924,10 +4924,13 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
||||
public func scrollToOffsetFromTop(_ offset: CGFloat, animated: Bool) -> Bool {
|
||||
for itemNode in self.itemNodes {
|
||||
if itemNode.index == 0 {
|
||||
if animated {
|
||||
self.scroller.setContentOffset(CGPoint(x: 0.0, y: offset + self.tempTopInset), animated: animated)
|
||||
} else {
|
||||
self.scroller.contentOffset = CGPoint(x: 0.0, y: offset + self.tempTopInset)
|
||||
if self.scroller.contentOffset.y != offset + self.tempTopInset {
|
||||
self.stopScrolling()
|
||||
if animated {
|
||||
self.scroller.setContentOffset(CGPoint(x: 0.0, y: offset + self.tempTopInset), animated: animated)
|
||||
} else {
|
||||
self.scroller.contentOffset = CGPoint(x: 0.0, y: offset + self.tempTopInset)
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user