mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-03 21:16:35 +00:00
Return CGSizeZero if ASTextNode's text length or attributed string is nil
This commit is contained in:
parent
f7f20ca8b7
commit
df730d6771
@ -173,9 +173,13 @@ static const CGFloat ASTextNodeRendererTextCapHeightPadding = 1.3;
|
||||
{
|
||||
ASDN::MutexLocker l(_textKitLock);
|
||||
|
||||
if (_attributedString.string.length == 0) {
|
||||
_calculatedSize = CGSizeZero;
|
||||
return;
|
||||
}
|
||||
|
||||
[self _initializeTextKitComponentsIfNeeded];
|
||||
|
||||
|
||||
// Force glyph generation and layout, which may not have happened yet (and
|
||||
// isn't triggered by -usedRectForTextContainer:).
|
||||
[_layoutManager ensureLayoutForTextContainer:_textContainer];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user