mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39: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:
parent
939c4e7b33
commit
382b9a69c3
@ -66,7 +66,8 @@ struct MessageText: UIViewRepresentable {
|
||||
// Need to use TextKit 1 for mentions
|
||||
let textView = MessageTextView(usingTextLayoutManager: false)
|
||||
textView.roomContext = viewModel
|
||||
textView.updateClosure = {
|
||||
textView.updateClosure = { [weak textView] in
|
||||
guard let textView else { return }
|
||||
do {
|
||||
attributedString = try AttributedString(textView.attributedText, including: \.elementX)
|
||||
} catch {
|
||||
|
Loading…
x
Reference in New Issue
Block a user