mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Pill View rendering, performance improvement part 2 (#1894)
* improvdement * code improvement
This commit is contained in:
@@ -26,7 +26,7 @@ final class MessageTextView: UITextView, PillAttachmentViewProviderDelegate {
|
||||
gestureRecognizer as? UILongPressGestureRecognizer == nil
|
||||
}
|
||||
|
||||
func invalidateTextAttachmentsDisplay(update: Bool) {
|
||||
func invalidateTextAttachmentsDisplay() {
|
||||
attributedText.enumerateAttribute(.attachment,
|
||||
in: NSRange(location: 0, length: attributedText.length),
|
||||
options: []) { value, range, _ in
|
||||
@@ -34,9 +34,7 @@ final class MessageTextView: UITextView, PillAttachmentViewProviderDelegate {
|
||||
return
|
||||
}
|
||||
self.layoutManager.invalidateDisplay(forCharacterRange: range)
|
||||
if update {
|
||||
updateClosure?()
|
||||
}
|
||||
updateClosure?()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user