diff --git a/submodules/ChatListUI/Sources/ChatListController.swift b/submodules/ChatListUI/Sources/ChatListController.swift index 1511ed4826..409c370380 100644 --- a/submodules/ChatListUI/Sources/ChatListController.swift +++ b/submodules/ChatListUI/Sources/ChatListController.swift @@ -3118,6 +3118,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController isReorderingTabs: .single(false), storyPostingAvailable: .single(false) ) + self.pendingSecondaryContext = pendingSecondaryContext let _ = (pendingSecondaryContext.ready.get() |> filter { $0 } diff --git a/submodules/ChatListUI/Sources/ChatListControllerNode.swift b/submodules/ChatListUI/Sources/ChatListControllerNode.swift index 77ea7f3bbf..b8469b58fa 100644 --- a/submodules/ChatListUI/Sources/ChatListControllerNode.swift +++ b/submodules/ChatListUI/Sources/ChatListControllerNode.swift @@ -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()