This commit is contained in:
Ali 2023-07-18 00:05:04 +04:00
parent 88ecedba25
commit b6d56a3c81
2 changed files with 8 additions and 0 deletions

View File

@ -3118,6 +3118,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
isReorderingTabs: .single(false),
storyPostingAvailable: .single(false)
)
self.pendingSecondaryContext = pendingSecondaryContext
let _ = (pendingSecondaryContext.ready.get()
|> filter { $0 }

View File

@ -2640,6 +2640,13 @@ final class ChatListControllerNode: ASDisplayNode, UIGestureRecognizerDelegate {
if let _ = self.containerLayout {
let transition: ContainedViewLayoutTransition = .animated(duration: 0.5, curve: .spring)
if let contentOffset = self.mainContainerNode.contentOffset, case let .known(offset) = contentOffset, offset < 0.0 {
if let containerLayout = self.containerLayout {
self.updateNavigationScrolling(navigationHeight: containerLayout.navigationBarHeight, transition: transition)
self.mainContainerNode.scrollToTop(animated: true, adjustForTempInset: false)
}
}
if let previousInlineStackContainerNode {
transition.updatePosition(node: previousInlineStackContainerNode, position: CGPoint(x: previousInlineStackContainerNode.position.x + previousInlineStackContainerNode.bounds.width + UIScreenPixel, y: previousInlineStackContainerNode.position.y), completion: { [weak previousInlineStackContainerNode] _ in
previousInlineStackContainerNode?.removeFromSupernode()