diff options
author | Frank Elias <francois.elias@livio.io> | 2020-10-05 11:22:53 -0400 |
---|---|---|
committer | Frank Elias <francois.elias@livio.io> | 2020-10-05 11:22:53 -0400 |
commit | b7c2b9d61653b6d918ec736b108f78ed0569fd65 (patch) | |
tree | a64cd3cf9e33aaab54fced36d0e164f3a8d9a722 | |
parent | 924c510363f406ba3527458e9e13581a4890b6f7 (diff) | |
download | sdl_ios-b7c2b9d61653b6d918ec736b108f78ed0569fd65.tar.gz |
Added suggested changes
Added suggested changes
-rw-r--r-- | SmartDeviceLink/public/SDLTouchManager.m | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/SmartDeviceLink/public/SDLTouchManager.m b/SmartDeviceLink/public/SDLTouchManager.m index ad9eb4703..25b88d6fa 100644 --- a/SmartDeviceLink/public/SDLTouchManager.m +++ b/SmartDeviceLink/public/SDLTouchManager.m @@ -434,12 +434,16 @@ static NSUInteger const MaximumNumberOfTouches = 2; [self sdl_cancelSingleTapTimer]; } - __weak typeof(self) weakSelf = self; - self.singleTapTimer = [[SDLTimer alloc] initWithDuration:self.tapTimeThreshold]; - self.singleTapTimer.elapsedBlock = ^{ - [weakSelf sdl_singleTapTimerCallbackWithPoint:point]; - }; - [self.singleTapTimer start]; + if (self.tapTimeThreshold == 0.0) { + [self sdl_singleTapTimerCallbackWithPoint:point]; + } else { + __weak typeof(self) weakSelf = self; + self.singleTapTimer = [[SDLTimer alloc] initWithDuration:self.tapTimeThreshold]; + self.singleTapTimer.elapsedBlock = ^{ + [weakSelf sdl_singleTapTimerCallbackWithPoint:point]; + }; + [self.singleTapTimer start]; + } } /** |