Browse Source

Merge remote-tracking branch 'origin/master'

kunfei 3 years ago
parent
commit
05f7cbbfe1

+ 3 - 4
app/src/main/java/io/legado/app/help/JsExtensions.kt

@@ -656,11 +656,10 @@ interface JsExtensions : JsEncodeUtils {
      * 输出调试日志
      * 输出调试日志
      */
      */
     fun log(msg: Any?): Any? {
     fun log(msg: Any?): Any? {
-        val msg1 = "书源调试输出:${msg}"
         getSource()?.let {
         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
         return msg
     }
     }
 
 

+ 1 - 1
app/src/main/java/io/legado/app/help/book/BookHelp.kt

@@ -162,7 +162,7 @@ object BookHelp {
             }
             }
         } catch (e: Exception) {
         } catch (e: Exception) {
             e.printStackTrace()
             e.printStackTrace()
-            AppLog.put("图片 $src 下载错误", e)
+            AppLog.put("图片 $src 下载错误\n${e.localizedMessage}", e)
         } finally {
         } finally {
             downloadImages.remove(src)
             downloadImages.remove(src)
         }
         }

+ 3 - 1
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 {
         binding.run {
             val isDur = callback.durChapterIndex() == item.index
             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 (payloads.isEmpty()) {
                 if (isDur) {
                 if (isDur) {
                     tvChapterName.setTextColor(context.accentColor)
                     tvChapterName.setTextColor(context.accentColor)