mirror of
https://github.com/gedoor/legado.git
synced 2024-07-04 23:36:56 +08:00
优化
This commit is contained in:
parent
9c27c3b44d
commit
03f8437270
|
@ -83,11 +83,9 @@ abstract class PageDelegate(protected val readView: ReadView) {
|
|||
|
||||
protected fun stopScroll() {
|
||||
isStarted = false
|
||||
readView.post {
|
||||
isMoved = false
|
||||
isRunning = false
|
||||
readView.invalidate()
|
||||
}
|
||||
isMoved = false
|
||||
isRunning = false
|
||||
readView.postInvalidate()
|
||||
}
|
||||
|
||||
@CallSuper
|
||||
|
@ -193,8 +191,10 @@ abstract class PageDelegate(protected val readView: ReadView) {
|
|||
fun postInvalidate() {
|
||||
if (isRunning && this is HorizontalPageDelegate) {
|
||||
readView.post {
|
||||
setBitmap()
|
||||
readView.invalidate()
|
||||
if (isRunning) {
|
||||
setBitmap()
|
||||
readView.invalidate()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user