Fix mention pills display on iOS 16

This commit is contained in:
aringenbach
2022-09-02 16:22:17 +02:00
parent 0280b316ac
commit 085441d133
5 changed files with 44 additions and 0 deletions
@@ -173,6 +173,13 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
}
self.textView.attributedText = attributedTextMessage;
if (@available(iOS 15.0, *)) {
// Fixes an iOS 16 issue where attachment are not drawn properly by
// forcing the layoutManager to redraw the glyphs at all NSAttachment positions.
[self.textView vc_invalidateTextAttachmentsDisplay];
}
[self updateUIWithAttributedTextMessage:attributedTextMessage animated:YES];
[self textViewDidChange:self.textView];
}