feat: 优化代码

pull/117/head 3.20.022515
kunfei 5 years ago
parent 9dfe4870e7
commit 8132afde6c
  1. 3
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt

@ -22,7 +22,8 @@ abstract class HorizontalPageDelegate(pageView: PageView) : PageDelegate(pageVie
private fun onScroll(event: MotionEvent) {
//判断是否移动了
if (!isMoved) {
isMoved = abs(startX - event.x) > slop || abs(startY - event.y) > slop
isMoved = abs(startX - event.x) > slop
|| abs(startX - event.x) > abs(startY - event.y)
if (isMoved) {
if (event.x - startX > 0) {
//如果上一页不存在

Loading…
Cancel
Save