Various improvements

This commit is contained in:
Isaac
2024-04-29 18:59:13 +04:00
parent 483737a5c6
commit bb404dbbd3
6 changed files with 35 additions and 6 deletions

View File

@@ -930,6 +930,12 @@ public class ChatMessageTextBubbleContentNode: ChatMessageBubbleContentNode {
return ChatMessageBubbleContentTapAction(content: .copy(pre))
} else if let code = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.Code)] as? String {
return ChatMessageBubbleContentTapAction(content: .copy(code))
} else if let _ = attributes[NSAttributedString.Key(rawValue: "Attribute__Blockquote")] {
if let text = self.textNode.textNode.attributeSubstring(name: "Attribute__Blockquote", index: index) {
return ChatMessageBubbleContentTapAction(content: .copy(text.1))
} else {
return ChatMessageBubbleContentTapAction(content: .none)
}
} else if let emoji = attributes[NSAttributedString.Key(rawValue: ChatTextInputAttributes.customEmoji.rawValue)] as? ChatTextInputTextCustomEmojiAttribute, let file = emoji.file {
return ChatMessageBubbleContentTapAction(content: .customEmoji(file))
} else {