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