mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 17:43:18 +00:00
Fix pinned message scrolling
This commit is contained in:
parent
d43b84497c
commit
eb0d2277ac
@ -290,7 +290,7 @@ final class ChatPinnedMessageTitlePanelNode: ChatTitleAccessoryPanelNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let isReplyThread: Bool
|
let isReplyThread: Bool
|
||||||
if case .replyThread = interfaceState.chatLocation {
|
if case let .replyThread(message) = interfaceState.chatLocation, !message.isForumPost {
|
||||||
isReplyThread = true
|
isReplyThread = true
|
||||||
} else {
|
} else {
|
||||||
isReplyThread = false
|
isReplyThread = false
|
||||||
|
|||||||
@ -2298,8 +2298,15 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
items.append(.action(ContextMenuActionItem(text: strings.SharedMedia_ViewInChat, icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/GoToMessage"), color: theme.contextMenu.primaryColor) }, action: { c, f in
|
items.append(.action(ContextMenuActionItem(text: strings.SharedMedia_ViewInChat, icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/GoToMessage"), color: theme.contextMenu.primaryColor) }, action: { c, f in
|
||||||
c.dismiss(completion: {
|
c.dismiss(completion: {
|
||||||
if let strongSelf = self, let currentPeer = strongSelf.data?.peer, let navigationController = strongSelf.controller?.navigationController as? NavigationController {
|
if let strongSelf = self, let currentPeer = strongSelf.data?.peer, let navigationController = strongSelf.controller?.navigationController as? NavigationController {
|
||||||
|
let targetLocation: NavigateToChatControllerParams.Location
|
||||||
|
if case let .replyThread(message) = strongSelf.chatLocation {
|
||||||
|
targetLocation = .replyThread(message)
|
||||||
|
} else {
|
||||||
|
targetLocation = .peer(EnginePeer(currentPeer))
|
||||||
|
}
|
||||||
|
|
||||||
let currentPeerId = strongSelf.peerId
|
let currentPeerId = strongSelf.peerId
|
||||||
strongSelf.context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: navigationController, context: strongSelf.context, chatLocation: .peer(EnginePeer(currentPeer)), subject: .message(id: .id(message.id), highlight: true, timecode: nil), keepStack: .always, useExisting: false, purposefulAction: {
|
strongSelf.context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: navigationController, context: strongSelf.context, chatLocation: targetLocation, subject: .message(id: .id(message.id), highlight: true, timecode: nil), keepStack: .always, useExisting: false, purposefulAction: {
|
||||||
var viewControllers = navigationController.viewControllers
|
var viewControllers = navigationController.viewControllers
|
||||||
var indexesToRemove = Set<Int>()
|
var indexesToRemove = Set<Int>()
|
||||||
var keptCurrentChatController = false
|
var keptCurrentChatController = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user