pull/1785/head
kunfei 3 years ago
parent a99e0876e7
commit 8101cf7ba8
  1. 3
      app/src/main/java/io/legado/app/api/controller/BookController.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt

@ -88,7 +88,8 @@ object BookController {
} }
this.bookUrl = bookUrl this.bookUrl = bookUrl
val bitmap = runBlocking { val bitmap = runBlocking {
ImageProvider.getImage(book, src, bookSource, width, width) ImageProvider.cacheImage(book, src, bookSource)
ImageProvider.getImage(book, src, width, width)
} }
return returnData.setData(bitmap) return returnData.setData(bitmap)
} }

@ -23,7 +23,7 @@ object ImageProvider {
BitmapFactory.decodeResource(appCtx.resources, R.drawable.image_loading_error) BitmapFactory.decodeResource(appCtx.resources, R.drawable.image_loading_error)
} }
private suspend fun cacheImage( suspend fun cacheImage(
book: Book, book: Book,
src: String, src: String,
bookSource: BookSource? bookSource: BookSource?

Loading…
Cancel
Save