diff --git a/app/src/main/java/io/legado/app/api/controller/BookController.kt b/app/src/main/java/io/legado/app/api/controller/BookController.kt index 0abc52b35..8771c8225 100644 --- a/app/src/main/java/io/legado/app/api/controller/BookController.kt +++ b/app/src/main/java/io/legado/app/api/controller/BookController.kt @@ -88,7 +88,8 @@ object BookController { } this.bookUrl = bookUrl 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) } diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt index 66ea0c78a..2de937b44 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt @@ -23,7 +23,7 @@ object ImageProvider { BitmapFactory.decodeResource(appCtx.resources, R.drawable.image_loading_error) } - private suspend fun cacheImage( + suspend fun cacheImage( book: Book, src: String, bookSource: BookSource?