Horis 3 سال پیش
والد
کامیت
c1f7c91669

+ 1 - 1
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)
             }
         }
     }

+ 1 - 0
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)