mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-14 16:08:51 +00:00
create local variables for performance and clarity
This commit is contained in:
parent
f4d5791717
commit
1457e97c59
@ -891,15 +891,16 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ];
|
|||||||
{
|
{
|
||||||
[super touchesMoved:touches withEvent:event];
|
[super touchesMoved:touches withEvent:event];
|
||||||
|
|
||||||
|
UITouch *touch = [touches anyObject];
|
||||||
|
CGPoint locationInView = [touch locationInView:self.view];
|
||||||
// on 3D Touch enabled phones, this gets fired with changes in force, and usually will get fired immediately after touchesBegan:withEvent:
|
// on 3D Touch enabled phones, this gets fired with changes in force, and usually will get fired immediately after touchesBegan:withEvent:
|
||||||
if (CGPointEqualToPoint([[touches anyObject] previousLocationInView:self.view], [[touches anyObject] locationInView:self.view]))
|
if (CGPointEqualToPoint([touch previousLocationInView:self.view], locationInView))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If touch has moved out of the current highlight range, clear the highlight.
|
// If touch has moved out of the current highlight range, clear the highlight.
|
||||||
if (_highlightRange.length > 0) {
|
if (_highlightRange.length > 0) {
|
||||||
NSRange range = NSMakeRange(0, 0);
|
NSRange range = NSMakeRange(0, 0);
|
||||||
CGPoint point = [[touches anyObject] locationInView:self.view];
|
[self _linkAttributeValueAtPoint:locationInView
|
||||||
[self _linkAttributeValueAtPoint:point
|
|
||||||
attributeName:NULL
|
attributeName:NULL
|
||||||
range:&range
|
range:&range
|
||||||
inAdditionalTruncationMessage:NULL
|
inAdditionalTruncationMessage:NULL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user