Merge pull request #1770 from Xwite/master

正文图片解码
This commit is contained in:
kunfei
2022-04-11 22:12:27 +08:00
committed by GitHub
4 changed files with 7 additions and 56 deletions
@@ -79,7 +79,6 @@ object BookController {
?: return returnData.setErrorMsg("bookUrl为空")
val src = parameters["path"]?.firstOrNull()
?: return returnData.setErrorMsg("图片链接为空")
val width = parameters["width"]?.firstOrNull()?.toInt() ?: 640
if (this.bookUrl != bookUrl) {
this.book = appDb.bookDao.getBook(bookUrl)
?: return returnData.setErrorMsg("bookUrl不对")
@@ -95,7 +94,7 @@ object BookController {
}
this.bookUrl = bookUrl
return returnData.setData(
BitmapUtils.decodeBitmap(vFile.absolutePath, width, width)
ImageLoader.loadBitmap(appCtx, vFile.absolutePath).submit().get()
)
}