From 57e3049b43a0a7a7d9880a00a106d31660db504f Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 15 Aug 2021 23:26:21 +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 --- .../main/java/io/legado/app/service/help/ReadBook.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/service/help/ReadBook.kt b/app/src/main/java/io/legado/app/service/help/ReadBook.kt index 35f668f48..782292072 100644 --- a/app/src/main/java/io/legado/app/service/help/ReadBook.kt +++ b/app/src/main/java/io/legado/app/service/help/ReadBook.kt @@ -80,10 +80,14 @@ object ReadBook { } fun setProgress(progress: BookProgress) { - durChapterIndex = progress.durChapterIndex - durChapterPos = progress.durChapterPos - clearTextChapter() - loadContent(resetPageOffset = true) + if (durChapterIndex != progress.durChapterIndex + || durChapterPos != progress.durChapterPos + ) { + durChapterIndex = progress.durChapterIndex + durChapterPos = progress.durChapterPos + clearTextChapter() + loadContent(resetPageOffset = true) + } } fun clearTextChapter() {