Fix reply headers on stickers in topics

This commit is contained in:
Ilya Laktyushin 2022-12-02 19:58:03 +04:00
parent c6788d923b
commit b1bc6d0925
2 changed files with 8 additions and 2 deletions

View File

@ -1208,7 +1208,10 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
}
if let replyAttribute = attribute as? ReplyMessageAttribute {
replyMessage = item.message.associatedMessages[replyAttribute.messageId]
if case let .replyThread(replyThreadMessage) = item.chatLocation, replyThreadMessage.messageId == replyAttribute.messageId {
} else {
replyMessage = item.message.associatedMessages[replyAttribute.messageId]
}
} else if let attribute = attribute as? ReplyMarkupMessageAttribute, attribute.flags.contains(.inline), !attribute.rows.isEmpty {
replyMarkup = attribute
}

View File

@ -637,7 +637,10 @@ class ChatMessageStickerItemNode: ChatMessageItemView {
if let replyAttribute = attribute as? ReplyMessageAttribute {
replyMessage = item.message.associatedMessages[replyAttribute.messageId]
if case let .replyThread(replyThreadMessage) = item.chatLocation, replyThreadMessage.messageId == replyAttribute.messageId {
} else {
replyMessage = item.message.associatedMessages[replyAttribute.messageId]
}
} else if let attribute = attribute as? ReplyMarkupMessageAttribute, attribute.flags.contains(.inline), !attribute.rows.isEmpty {
replyMarkup = attribute
}