mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-24 03:41:54 +01:00
Single tap up/down scrolls up/down on webtoon viewer
Along side L/R tapping
This commit is contained in:
parent
b73ae950ad
commit
7b3556fcba
@ -89,7 +89,10 @@ class WebtoonViewer(val activity: ReaderActivity) : BaseViewer {
|
|||||||
})
|
})
|
||||||
recycler.tapListener = { event ->
|
recycler.tapListener = { event ->
|
||||||
val positionX = event.rawX
|
val positionX = event.rawX
|
||||||
|
val positionY = event.rawY
|
||||||
when {
|
when {
|
||||||
|
positionY < recycler.height * 0.25 -> if (config.tappingEnabled) scrollUp()
|
||||||
|
positionY > recycler.height * 0.75 -> if (config.tappingEnabled) scrollDown()
|
||||||
positionX < recycler.width * 0.33 -> if (config.tappingEnabled) scrollUp()
|
positionX < recycler.width * 0.33 -> if (config.tappingEnabled) scrollUp()
|
||||||
positionX > recycler.width * 0.66 -> if (config.tappingEnabled) scrollDown()
|
positionX > recycler.width * 0.66 -> if (config.tappingEnabled) scrollDown()
|
||||||
else -> activity.toggleMenu()
|
else -> activity.toggleMenu()
|
||||||
|
Loading…
Reference in New Issue
Block a user