diff --git a/frontend/ui/gesturedetector.lua b/frontend/ui/gesturedetector.lua index 1a334527a..a299b6181 100644 --- a/frontend/ui/gesturedetector.lua +++ b/frontend/ui/gesturedetector.lua @@ -209,20 +209,20 @@ end function GestureDetector:initialState(tev) local slot = tev.slot if tev.id then - -- a event ends + -- an event ends if tev.id == -1 then self.detectings[slot] = false else self.track_ids[slot] = tev.id - end - end - if tev.x and tev.y then - -- user starts a new touch motion - if not self.detectings[slot] then - self.detectings[slot] = true - self.first_tevs[slot] = self:deepCopyEv(tev) - -- default to tap state - return self:switchState("tapState", tev) + if tev.x and tev.y then + -- user starts a new touch motion + if not self.detectings[slot] then + self.detectings[slot] = true + self.first_tevs[slot] = self:deepCopyEv(tev) + -- default to tap state + return self:switchState("tapState", tev) + end + end end end end