Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin 2023-07-17 22:07:18 +02:00
commit 45a28d4ce0
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()