From 19bc67c9d332b2a3b616c32116612ec1a9b5fb17 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 20 Oct 2023 01:19:35 +0400 Subject: [PATCH] Fix replies --- .../TelegramCore/Sources/ApiUtils/StoreMessage_Telegram.swift | 3 ++- .../Sources/ReplyAccessoryPanelNode.swift | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/submodules/TelegramCore/Sources/ApiUtils/StoreMessage_Telegram.swift b/submodules/TelegramCore/Sources/ApiUtils/StoreMessage_Telegram.swift index a2278e7d01..f9c0610d99 100644 --- a/submodules/TelegramCore/Sources/ApiUtils/StoreMessage_Telegram.swift +++ b/submodules/TelegramCore/Sources/ApiUtils/StoreMessage_Telegram.swift @@ -624,7 +624,8 @@ extension StoreMessage { } } attributes.append(ReplyMessageAttribute(messageId: MessageId(peerId: replyPeerId, namespace: Namespaces.Message.Cloud, id: replyToMsgId), threadMessageId: threadMessageId, quote: quote)) - } else if let replyHeader = replyHeader { + } + if let replyHeader = replyHeader { attributes.append(QuotedReplyMessageAttribute(apiHeader: replyHeader, quote: quote)) } case let .messageReplyStoryHeader(userId, storyId): diff --git a/submodules/TelegramUI/Components/Chat/ReplyAccessoryPanelNode/Sources/ReplyAccessoryPanelNode.swift b/submodules/TelegramUI/Components/Chat/ReplyAccessoryPanelNode/Sources/ReplyAccessoryPanelNode.swift index 296edfd64d..d6340a035b 100644 --- a/submodules/TelegramUI/Components/Chat/ReplyAccessoryPanelNode/Sources/ReplyAccessoryPanelNode.swift +++ b/submodules/TelegramUI/Components/Chat/ReplyAccessoryPanelNode/Sources/ReplyAccessoryPanelNode.swift @@ -266,7 +266,6 @@ public final class ReplyAccessoryPanelNode: AccessoryPanelNode { } else { let string = strongSelf.strings.Conversation_ReplyMessagePanelTitle(authorName).string titleText = [.text(NSAttributedString(string: string, font: Font.medium(15.0), textColor: .white))] - strongSelf.textNode.attributedText = messageText } if strongSelf.messageId.peerId != strongSelf.chatPeerId { @@ -285,6 +284,8 @@ public final class ReplyAccessoryPanelNode: AccessoryPanelNode { } } + strongSelf.textNode.attributedText = messageText + if let quote = strongSelf.quote { let textColor = strongSelf.theme.chat.inputPanel.primaryTextColor let quoteText = stringWithAppliedEntities(trimToLineCount(quote.text, lineCount: 1), entities: quote.entities, baseColor: textColor, linkColor: textColor, baseFont: textFont, linkFont: textFont, boldFont: textFont, italicFont: textFont, boldItalicFont: textFont, fixedFont: textFont, blockQuoteFont: textFont, underlineLinks: false, message: message)