From acbe2fd47693c491c68a1923bc4b3ea96c647158 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Fri, 12 Jan 2024 01:20:53 +0100 Subject: [PATCH] refactor: remove unneeded checks --- src/GestureManager.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/GestureManager.cpp b/src/GestureManager.cpp index c7d290e..359637a 100644 --- a/src/GestureManager.cpp +++ b/src/GestureManager.cpp @@ -200,11 +200,7 @@ void GestureManager::dragGestureUpdate(const wf::touch::gesture_event_t& ev) { } void GestureManager::handleDragGestureEnd(const DragGesture& gev) { - if (!this->getActiveDragGesture().has_value()) { - return; - } - - switch (this->getActiveDragGesture()->type) { + switch (gev.type) { case DragGestureType::SWIPE: emulateSwipeEnd(0, false); return;