Various improvements

This commit is contained in:
Isaac
2024-06-24 18:19:53 +01:00
parent 13026a5cc4
commit 6807abf42c
21 changed files with 915 additions and 211 deletions

View File

@@ -423,6 +423,11 @@ final class MessageItemView: UIView {
}
let messageAttributedText = NSMutableAttributedString(attributedString: textString)
for entity in generateTextEntities(textString.string, enabledTypes: .all) {
messageAttributedText.addAttribute(.foregroundColor, value: presentationData.theme.chat.message.outgoing.linkTextColor, range: NSRange(location: entity.range.lowerBound, length: entity.range.upperBound - entity.range.lowerBound))
}
textNode.attributedText = messageAttributedText
}
@@ -620,6 +625,11 @@ final class MessageItemView: UIView {
}
let messageAttributedText = NSMutableAttributedString(attributedString: textString)
for entity in generateTextEntities(textString.string, enabledTypes: .all) {
messageAttributedText.addAttribute(.foregroundColor, value: presentationData.theme.chat.message.outgoing.linkTextColor, range: NSRange(location: entity.range.lowerBound, length: entity.range.upperBound - entity.range.lowerBound))
}
textNode.attributedText = messageAttributedText
}