This commit is contained in:
kunfei
2022-04-14 12:17:49 +08:00
parent a99e0876e7
commit 8101cf7ba8
2 changed files with 3 additions and 2 deletions

View File

@@ -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)
}

View File

@@ -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?