reverting some of the performance improvements

This commit is contained in:
Mauro Romito
2023-10-18 11:51:03 +02:00
committed by Mauro
parent 6e8dff2ef6
commit 2b89721aa0
3 changed files with 3 additions and 22 deletions
@@ -64,8 +64,7 @@ final class PillAttachmentViewProvider: NSTextAttachmentViewProvider {
return
}
let view = PillView(imageProvider: imageProvider, context: context) { [weak self, weak textAttachment] in
textAttachment?.invalidateLastBounds()
let view = PillView(imageProvider: imageProvider, context: context) { [weak self] in
self?.delegate?.invalidateTextAttachmentsDisplay()
}
let controller = UIHostingController(rootView: view)
@@ -73,7 +72,6 @@ final class PillAttachmentViewProvider: NSTextAttachmentViewProvider {
// This allows the text view to handle it as a link
controller.view.isUserInteractionEnabled = false
self.view = controller.view
textAttachment.view = controller.view
delegate?.registerPillView(controller.view)
}
}