From b4f93fc0a504b23558a088d2fb25ff36f6674b1d Mon Sep 17 00:00:00 2001 From: Koitharu Date: Fri, 26 Aug 2022 10:06:50 +0300 Subject: [PATCH] Fix showing reader control by long press --- .../java/org/koitharu/kotatsu/utils/GridTouchHelper.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/koitharu/kotatsu/utils/GridTouchHelper.kt b/app/src/main/java/org/koitharu/kotatsu/utils/GridTouchHelper.kt index 13ccd3fa7..9605fb93b 100644 --- a/app/src/main/java/org/koitharu/kotatsu/utils/GridTouchHelper.kt +++ b/app/src/main/java/org/koitharu/kotatsu/utils/GridTouchHelper.kt @@ -7,7 +7,7 @@ import kotlin.math.roundToInt class GridTouchHelper( context: Context, - private val listener: OnGridTouchListener + private val listener: OnGridTouchListener, ) : GestureDetector.SimpleOnGestureListener() { private val detector = GestureDetector(context, this) @@ -16,7 +16,7 @@ class GridTouchHelper( private var isDispatching = false init { - detector.setIsLongpressEnabled(false) + detector.setIsLongpressEnabled(true) detector.setOnDoubleTapListener(this) } @@ -46,7 +46,7 @@ class GridTouchHelper( } 2 -> AREA_RIGHT else -> return false - } + }, ) return true } @@ -66,4 +66,4 @@ class GridTouchHelper( fun onProcessTouch(rawX: Int, rawY: Int): Boolean } -} \ No newline at end of file +}