pull/1415/head
gedoor 3 years ago
parent e2702cec9b
commit a783447af6
  1. 1
      app/src/main/java/io/legado/app/help/ThemeConfig.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt
  3. 2
      app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt

@ -59,7 +59,6 @@ object ThemeConfig {
if (bgCfg.first.isNullOrBlank()) return null if (bgCfg.first.isNullOrBlank()) return null
val bgImage = BitmapUtils val bgImage = BitmapUtils
.decodeBitmap(bgCfg.first!!, metrics.widthPixels, metrics.heightPixels) .decodeBitmap(bgCfg.first!!, metrics.widthPixels, metrics.heightPixels)
?: return null
if (bgCfg.second == 0) { if (bgCfg.second == 0) {
return bgImage return bgImage
} }

@ -61,9 +61,7 @@ object ImageProvider {
ChapterProvider.visibleWidth, ChapterProvider.visibleWidth,
ChapterProvider.visibleHeight ChapterProvider.visibleHeight
) )
if (bitmap != null) {
setCache(chapterIndex, src, bitmap) setCache(chapterIndex, src, bitmap)
}
bitmap bitmap
} catch (e: Exception) { } catch (e: Exception) {
null null

@ -52,7 +52,7 @@ class HandleFileContract :
var title: String? = null, var title: String? = null,
var allowExtensions: Array<String> = arrayOf(), var allowExtensions: Array<String> = arrayOf(),
var otherActions: ArrayList<SelectItem<Int>>? = null, var otherActions: ArrayList<SelectItem<Int>>? = null,
var fileData: Triple<String, ByteArray, String>? = null var fileData: Triple<String, ByteArray, String>? = null,
) )
} }
Loading…
Cancel
Save