From 4bb9d38e18b01474c7602908269c1d713daa7774 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Thu, 26 Jan 2023 18:03:57 +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/JsExtensions.kt | 7 +++---- app/src/main/java/io/legado/app/help/book/BookHelp.kt | 2 +- .../java/io/legado/app/ui/book/toc/ChapterListAdapter.kt | 4 +++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/JsExtensions.kt b/app/src/main/java/io/legado/app/help/JsExtensions.kt index b4f751927..9e45725ca 100644 --- a/app/src/main/java/io/legado/app/help/JsExtensions.kt +++ b/app/src/main/java/io/legado/app/help/JsExtensions.kt @@ -656,11 +656,10 @@ interface JsExtensions : JsEncodeUtils { * 输出调试日志 */ fun log(msg: Any?): Any? { - val msg1 = "书源调试输出:${msg}" getSource()?.let { - Debug.log(it.getKey(), msg1) - } ?: Debug.log(msg1) - AppLog.putDebug(msg1) + Debug.log(it.getKey(), msg.toString()) + } ?: Debug.log(msg.toString()) + AppLog.putDebug("书源调试输出:$msg") return msg } diff --git a/app/src/main/java/io/legado/app/help/book/BookHelp.kt b/app/src/main/java/io/legado/app/help/book/BookHelp.kt index 4136fa779..dcf8560de 100644 --- a/app/src/main/java/io/legado/app/help/book/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/book/BookHelp.kt @@ -162,7 +162,7 @@ object BookHelp { } } catch (e: Exception) { e.printStackTrace() - AppLog.put("图片 $src 下载错误", e) + AppLog.put("图片 $src 下载错误\n${e.localizedMessage}", e) } finally { downloadImages.remove(src) } diff --git a/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt b/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt index 3dee78617..261326685 100644 --- a/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt @@ -119,7 +119,9 @@ class ChapterListAdapter(context: Context, val callback: Callback) : ) { binding.run { val isDur = callback.durChapterIndex() == item.index - val cached = callback.isLocalBook || cacheFileNames.contains(item.getFileName()) + val cached = callback.isLocalBook + || item.isVolume + || cacheFileNames.contains(item.getFileName()) if (payloads.isEmpty()) { if (isDur) { tvChapterName.setTextColor(context.accentColor)