mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +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() {
|
protected fun stopScroll() {
|
||||||
isStarted = false
|
isStarted = false
|
||||||
readView.post {
|
isMoved = false
|
||||||
isMoved = false
|
isRunning = false
|
||||||
isRunning = false
|
readView.postInvalidate()
|
||||||
readView.invalidate()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@CallSuper
|
@CallSuper
|
||||||
@ -193,8 +191,10 @@ abstract class PageDelegate(protected val readView: ReadView) {
|
|||||||
fun postInvalidate() {
|
fun postInvalidate() {
|
||||||
if (isRunning && this is HorizontalPageDelegate) {
|
if (isRunning && this is HorizontalPageDelegate) {
|
||||||
readView.post {
|
readView.post {
|
||||||
setBitmap()
|
if (isRunning) {
|
||||||
readView.invalidate()
|
setBitmap()
|
||||||
|
readView.invalidate()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user