mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-26 23:28:58 +03:00
toggle reader menu if transition by tapping are disabled (#2887)
Co-authored-by: raslmenea.rm@gmail.com <xpuf4MQNzDtnaqR>
This commit is contained in:
parent
bcde4337ac
commit
8de004d281
2 changed files with 4 additions and 4 deletions
|
@ -82,8 +82,8 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer {
|
|||
pager.tapListener = { event ->
|
||||
val positionX = event.x
|
||||
when {
|
||||
positionX < pager.width * 0.33f -> if (config.tappingEnabled) moveLeft()
|
||||
positionX > pager.width * 0.66f -> if (config.tappingEnabled) moveRight()
|
||||
positionX < pager.width * 0.33f -> if (config.tappingEnabled) moveLeft() else activity.toggleMenu()
|
||||
positionX > pager.width * 0.66f -> if (config.tappingEnabled) moveRight() else activity.toggleMenu()
|
||||
else -> activity.toggleMenu()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,8 +95,8 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr
|
|||
recycler.tapListener = { event ->
|
||||
val positionX = event.rawX
|
||||
when {
|
||||
positionX < recycler.width * 0.33 -> if (config.tappingEnabled) scrollUp()
|
||||
positionX > recycler.width * 0.66 -> if (config.tappingEnabled) scrollDown()
|
||||
positionX < recycler.width * 0.33 -> if (config.tappingEnabled) scrollUp() else activity.toggleMenu()
|
||||
positionX > recycler.width * 0.66 -> if (config.tappingEnabled) scrollDown() else activity.toggleMenu()
|
||||
else -> activity.toggleMenu()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue