feat: 优化代码

pull/133/head
kunfei 5 years ago
parent 1298747e45
commit 7d178ebc8b
  1. 4
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt

@ -20,11 +20,15 @@ abstract class HorizontalPageDelegate(pageView: PageView) : PageDelegate(pageVie
private fun setBitmap() {
when (mDirection) {
Direction.PREV -> {
prevBitmap?.recycle()
prevBitmap = prevPage.screenshot()
curBitmap?.recycle()
curBitmap = curPage.screenshot()
}
Direction.NEXT -> {
nextBitmap?.recycle()
nextBitmap = nextPage.screenshot()
curBitmap?.recycle()
curBitmap = curPage.screenshot()
}
else -> Unit

Loading…
Cancel
Save