From 95e0d64061376db494e2dd815af896b33c8b6d5f Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 10 Jan 2022 20:37:35 +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/assets/updateLog.md | 3 ++- app/src/main/java/io/legado/app/model/ReadBook.kt | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 81a11ebef..378ad53c3 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -11,10 +11,11 @@ * 正文出现缺字漏字、内容缺失、排版错乱等情况,有可能是净化规则或简繁转换出现问题。 * 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源! -**2022/01/09** +**2022/01/10** * 继续修复txt目录识别,现在识别启用的规则,再识别禁用的规则,按目录匹配数由多到少识别,如果有章节大于5万字就尝试下一个目录规则,如果没有任何目录匹配或每章都小于5万字则自动分段 * 修复全局搜索跳转bug +* 从外部打开的文件如果书架上已有会对比更新时间,如果打开的文件更新会替换原文件 **2022/01/06** diff --git a/app/src/main/java/io/legado/app/model/ReadBook.kt b/app/src/main/java/io/legado/app/model/ReadBook.kt index cbf85bf4f..99eb3d7ff 100644 --- a/app/src/main/java/io/legado/app/model/ReadBook.kt +++ b/app/src/main/java/io/legado/app/model/ReadBook.kt @@ -93,10 +93,12 @@ object ReadBook : CoroutineScope by MainScope() { if (durChapterIndex != progress.durChapterIndex || durChapterPos != progress.durChapterPos ) { - durChapterIndex = progress.durChapterIndex - durChapterPos = progress.durChapterPos - clearTextChapter() - loadContent(resetPageOffset = true) + if (progress.durChapterIndex > chapterSize) { + durChapterIndex = progress.durChapterIndex + durChapterPos = progress.durChapterPos + clearTextChapter() + loadContent(resetPageOffset = true) + } } }