mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-15 07:19:57 +00:00
[ASTextNode] Check variables before calling delegate method #trivial (#898)
This commit is contained in:
committed by
Huy Nguyen
parent
bf48ebd8da
commit
382f624d83
@@ -1051,7 +1051,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI
|
||||
|
||||
// Respond to long-press when it begins, not when it ends.
|
||||
if (longPressRecognizer.state == UIGestureRecognizerStateBegan) {
|
||||
if ([_delegate respondsToSelector:@selector(textNode:longPressedLinkAttribute:value:atPoint:textRange:)]) {
|
||||
if ([self _pendingLinkTap] && [_delegate respondsToSelector:@selector(textNode:longPressedLinkAttribute:value:atPoint:textRange:)]) {
|
||||
CGPoint touchPoint = [_longPressGestureRecognizer locationInView:self.view];
|
||||
[_delegate textNode:self longPressedLinkAttribute:_highlightedLinkAttributeName value:_highlightedLinkAttributeValue atPoint:touchPoint textRange:_highlightRange];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user