mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Fix a retain cycle on MessageText.
This was generating warnings about an excessive number of gesture recognisers.
This commit is contained in:
@@ -66,7 +66,8 @@ struct MessageText: UIViewRepresentable {
|
|||||||
// Need to use TextKit 1 for mentions
|
// Need to use TextKit 1 for mentions
|
||||||
let textView = MessageTextView(usingTextLayoutManager: false)
|
let textView = MessageTextView(usingTextLayoutManager: false)
|
||||||
textView.roomContext = viewModel
|
textView.roomContext = viewModel
|
||||||
textView.updateClosure = {
|
textView.updateClosure = { [weak textView] in
|
||||||
|
guard let textView else { return }
|
||||||
do {
|
do {
|
||||||
attributedString = try AttributedString(textView.attributedText, including: \.elementX)
|
attributedString = try AttributedString(textView.attributedText, including: \.elementX)
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
Reference in New Issue
Block a user