feat: 优化代码

pull/134/head^2
kunfei 5 years ago
parent 16d9a85db7
commit c7f7e48998
  1. 12
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt

@ -65,13 +65,13 @@ abstract class PageDelegate(protected val pageView: PageView) :
var mDirection = Direction.NONE
var isCancel = false
var isRunning = false
var isStarted = false
private var isStarted = false
var isTextSelected = false
var selectedOnDown = false
private var selectedOnDown = false
var firstRelativePage = 0
var firstLineIndex: Int = 0
var firstCharIndex: Int = 0
private var firstRelativePage = 0
private var firstLineIndex: Int = 0
private var firstCharIndex: Int = 0
init {
curPage.resetPageOffset()
@ -127,9 +127,9 @@ abstract class PageDelegate(protected val pageView: PageView) :
}
private fun stopScroll() {
isMoved = false
isStarted = false
pageView.post {
isMoved = false
isRunning = false
pageView.invalidate()
}

Loading…
Cancel
Save