diff --git a/apps/android/app/src/main/java/chat/simplex/app/views/helpers/GestureDetector.kt b/apps/android/app/src/main/java/chat/simplex/app/views/helpers/GestureDetector.kt index e29f2de9c0..e19f00f971 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/views/helpers/GestureDetector.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/views/helpers/GestureDetector.kt @@ -86,11 +86,7 @@ suspend fun PointerInputScope.detectGesture( } else { if (shouldConsume) upOrCancel.consumeDownChange() - // If onLongPress event is needed, cancel short press event - if (onLongPress != null) - pressScope.cancel() - else - pressScope.release() + pressScope.release() } } catch (_: PointerEventTimeoutCancellationException) { onLongPress?.invoke(down.position) @@ -176,7 +172,7 @@ private class PressGestureScopeImpl( if (!isReleased && !isCanceled) { mutex.lock() } - return isCanceled + return isReleased && !isCanceled } }