From a783447af63683f691935e91be53d818d2612dd6 Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 22 Oct 2021 15:23:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/ThemeConfig.kt | 1 - .../io/legado/app/ui/book/read/page/provider/ImageProvider.kt | 4 +--- .../main/java/io/legado/app/ui/document/HandleFileContract.kt | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/ThemeConfig.kt b/app/src/main/java/io/legado/app/help/ThemeConfig.kt index 819284723..482c91df6 100644 --- a/app/src/main/java/io/legado/app/help/ThemeConfig.kt +++ b/app/src/main/java/io/legado/app/help/ThemeConfig.kt @@ -59,7 +59,6 @@ object ThemeConfig { if (bgCfg.first.isNullOrBlank()) return null val bgImage = BitmapUtils .decodeBitmap(bgCfg.first!!, metrics.widthPixels, metrics.heightPixels) - ?: return null if (bgCfg.second == 0) { return bgImage } 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 6ccbb62ef..386a37dbb 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 @@ -61,9 +61,7 @@ object ImageProvider { ChapterProvider.visibleWidth, ChapterProvider.visibleHeight ) - if (bitmap != null) { - setCache(chapterIndex, src, bitmap) - } + setCache(chapterIndex, src, bitmap) bitmap } catch (e: Exception) { null diff --git a/app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt b/app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt index fb18b5699..402d9ed63 100644 --- a/app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt +++ b/app/src/main/java/io/legado/app/ui/document/HandleFileContract.kt @@ -52,7 +52,7 @@ class HandleFileContract : var title: String? = null, var allowExtensions: Array = arrayOf(), var otherActions: ArrayList>? = null, - var fileData: Triple? = null + var fileData: Triple? = null, ) } \ No newline at end of file