Various improvements

This commit is contained in:
Ilya Laktyushin
2025-06-10 22:11:07 +02:00
parent 2d1e99affe
commit f59abe1689
29 changed files with 1289 additions and 199 deletions

View File

@@ -1297,7 +1297,6 @@ public class ChatMessageTextBubbleContentNode: ChatMessageBubbleContentNode {
public func updateQuoteTextHighlightState(text: String?, offset: Int?, color: UIColor, animated: Bool) {
var rectsSet: [CGRect] = []
if let text = text, !text.isEmpty, let cachedLayout = self.textNode.textNode.cachedLayout, let string = cachedLayout.attributedString?.string {
let quoteRange = findQuoteRange(string: string, quoteText: text, offset: offset)
if let quoteRange, let rects = cachedLayout.rangeRects(in: quoteRange)?.rects, !rects.isEmpty {
rectsSet = rects