From b7c2b9d61653b6d918ec736b108f78ed0569fd65 Mon Sep 17 00:00:00 2001 From: Frank Elias Date: Mon, 5 Oct 2020 11:22:53 -0400 Subject: Added suggested changes Added suggested changes --- SmartDeviceLink/public/SDLTouchManager.m | 16 ++++++++++------ 1 file 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]; + } } /** -- cgit v1.2.1