mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
More crash fixes
This commit is contained in:
parent
6cf84256fe
commit
4a6e2a5d99
2 changed files with 18 additions and 14 deletions
|
@ -172,6 +172,7 @@ abstract class PagerReader : BaseReader() {
|
|||
protected fun createGestureDetector(): GestureDetector {
|
||||
return GestureDetector(activity, object : GestureDetector.SimpleOnGestureListener() {
|
||||
override fun onSingleTapConfirmed(e: MotionEvent): Boolean {
|
||||
if (isAdded) {
|
||||
val positionX = e.x
|
||||
|
||||
if (positionX < pager.width * LEFT_REGION) {
|
||||
|
@ -181,6 +182,7 @@ abstract class PagerReader : BaseReader() {
|
|||
} else {
|
||||
readerActivity.toggleMenu()
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
|
|
@ -127,6 +127,7 @@ class WebtoonReader : BaseReader() {
|
|||
protected fun createGestureDetector(): GestureDetector {
|
||||
return GestureDetector(context, object : SimpleOnGestureListener() {
|
||||
override fun onSingleTapConfirmed(e: MotionEvent): Boolean {
|
||||
if (isAdded) {
|
||||
val positionX = e.x
|
||||
|
||||
if (positionX < recycler.width * LEFT_REGION) {
|
||||
|
@ -136,6 +137,7 @@ class WebtoonReader : BaseReader() {
|
|||
} else {
|
||||
readerActivity.toggleMenu()
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue