Fix reactions

This commit is contained in:
Ali
2021-11-19 19:50:04 +04:00
parent 41fbe0ef76
commit 7f142f0619
14 changed files with 14 additions and 62 deletions

View File

@@ -322,7 +322,7 @@ final class ChatMessageAttachedContentNode: ASDisplayNode {
}
var viewCount: Int?
var dateReplies = 0
var dateReactions: [MessageReaction] = []
let dateReactions: [MessageReaction] = mergedMessageReactions(attributes: message.attributes)?.reactions ?? []
for attribute in message.attributes {
if let attribute = attribute as? EditedMessageAttribute {
edited = !attribute.isHidden
@@ -332,10 +332,6 @@ final class ChatMessageAttachedContentNode: ASDisplayNode {
if let channel = message.peers[message.id.peerId] as? TelegramChannel, case .group = channel.info {
dateReplies = Int(attribute.count)
}
} else if let attribute = attribute as? PendingReactionsMessageAttribute {
if let value = attribute.value {
dateReactions = [MessageReaction(value: value, count: 1, isSelected: true)]
}
}
}