Continue Last Thread fix

This commit is contained in:
Isaac 2026-02-13 19:19:20 +04:00
parent a8a308d7a6
commit 6c37615dbd

View file

@ -4877,8 +4877,21 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
if actionButtonsNode !== strongSelf.actionButtonsNode {
strongSelf.actionButtonsNode = actionButtonsNode
actionButtonsNode.buttonPressed = { [weak strongSelf] button, progress in
if let strongSelf = strongSelf {
strongSelf.performMessageButtonAction(button: button, progress: progress)
if let strongSelf, let item = strongSelf.item {
if item.content.firstMessageAttributes.displayContinueThreadFooter {
var hasMarkup = false
for attribute in item.message.attributes {
if let attribute = attribute as? ReplyMarkupMessageAttribute, attribute.flags.contains(.inline), !attribute.rows.isEmpty {
hasMarkup = true
}
}
if !hasMarkup {
item.controllerInteraction.updateChatLocationThread(item.message.threadId, nil)
return
}
strongSelf.performMessageButtonAction(button: button, progress: progress)
}
}
}
actionButtonsNode.buttonLongTapped = { [weak strongSelf] button in