mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-21 13:50:29 +00:00
If trailing rect was set early return
This commit is contained in:
parent
91b6995987
commit
a9d0542d8f
@ -346,6 +346,11 @@ static const CGFloat ASTextKitRendererTextCapHeightPadding = 1.3;
|
|||||||
textRange = NSMakeRange([textStorage length] - 1, 1);
|
textRange = NSMakeRange([textStorage length] - 1, 1);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
// If trailing rect was set early return here
|
||||||
|
if (!CGRectEqualToRect(trailingRect, CGRectNull)) {
|
||||||
|
return trailingRect;
|
||||||
|
}
|
||||||
|
|
||||||
// Take everything after our final character as trailing space.
|
// Take everything after our final character as trailing space.
|
||||||
NSArray *finalRects = [self rectsForTextRange:textRange measureOption:ASTextKitRendererMeasureOptionLineHeight];
|
NSArray *finalRects = [self rectsForTextRange:textRange measureOption:ASTextKitRendererMeasureOptionLineHeight];
|
||||||
CGRect finalGlyphRect = [[finalRects lastObject] CGRectValue];
|
CGRect finalGlyphRect = [[finalRects lastObject] CGRectValue];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user