From d5a82de76af397a54ce6ea7de0cdb3220be3de84 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Sun, 17 Sep 2023 23:19:18 +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/model/ReadBook.kt | 2 +- .../main/java/io/legado/app/ui/book/read/ReadBookActivity.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 24226c687a55..a7273566f301 100644 --- a/app/src/main/java/io/legado/app/model/ReadBook.kt +++ b/app/src/main/java/io/legado/app/model/ReadBook.kt @@ -502,7 +502,7 @@ object ReadBook : CoroutineScope by MainScope() { ) { appDb.bookChapterDao.insert(*cList.toTypedArray()) chapterSize = cList.size - nextTextChapter ?: loadContent(1) + nextTextChapter ?: loadContent(durChapterIndex + 1) } } } diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index c4766a435911..ca89af7c57c3 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -1375,6 +1375,7 @@ class ReadBookActivity : BaseReadBookActivity(), } ReadBook.preDownloadTask?.cancel() ReadBook.downloadScope.coroutineContext.cancelChildren() + ReadBook.coroutineContext.cancelChildren() ReadBook.downloadedChapters.clear() if (!BuildConfig.DEBUG) { Backup.autoBack(this)