Various fixes

This commit is contained in:
Ilya Laktyushin
2023-06-24 03:55:03 +04:00
parent 4456d4eed8
commit d058e0a8c5
7 changed files with 129 additions and 26 deletions

View File

@@ -539,6 +539,7 @@ public func refreshChatTextInputAttributes(textView: UITextView, primaryTextColo
textView.textStorage.removeAttribute(NSAttributedString.Key.font, range: fullRange)
textView.textStorage.removeAttribute(NSAttributedString.Key.foregroundColor, range: fullRange)
textView.textStorage.removeAttribute(NSAttributedString.Key.backgroundColor, range: fullRange)
textView.textStorage.removeAttribute(NSAttributedString.Key.underlineStyle, range: fullRange)
textView.textStorage.removeAttribute(NSAttributedString.Key.strikethroughStyle, range: fullRange)
textView.textStorage.removeAttribute(ChatTextInputAttributes.textMention, range: fullRange)
@@ -646,6 +647,7 @@ public func refreshGenericTextInputAttributes(_ textNode: ASEditableTextNode, th
if !resultAttributedText.isEqual(to: initialAttributedText) {
textNode.textView.textStorage.removeAttribute(NSAttributedString.Key.font, range: fullRange)
textNode.textView.textStorage.removeAttribute(NSAttributedString.Key.foregroundColor, range: fullRange)
textNode.textView.textStorage.removeAttribute(NSAttributedString.Key.backgroundColor, range: fullRange)
textNode.textView.textStorage.removeAttribute(NSAttributedString.Key.underlineStyle, range: fullRange)
textNode.textView.textStorage.removeAttribute(NSAttributedString.Key.strikethroughStyle, range: fullRange)
textNode.textView.textStorage.removeAttribute(ChatTextInputAttributes.textMention, range: fullRange)