Update ImageProvider.kt

加入baseUrl变量申明
pull/314/head
AndyBernie 4 years ago committed by GitHub
parent e1107bf144
commit deda8c40a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt

@ -31,7 +31,7 @@ object ImageProvider {
indexCache[src] = bitmap
}
fun getImage(book: Book, chapterIndex: Int, src: String, onUi: Boolean = false): Bitmap? {
fun getImage(book: Book, chapterIndex: Int, src: String, baseUrl: String, onUi: Boolean = false): Bitmap? {
getCache(chapterIndex, src)?.let {
return it
}
@ -49,7 +49,7 @@ object ImageProvider {
out.close()
}
} else if (!onUi) {
HttpHelper.getBytes(src, src)?.let {
HttpHelper.getBytes(src, baseUrl)?.let {
FileUtils.createFileIfNotExist(vFile.absolutePath).writeBytes(it)
}
}

Loading…
Cancel
Save