diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt index 009c88979..841b06199 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt @@ -236,10 +236,9 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { curTextChapter = nextTextChapter nextTextChapter = null bookData.value?.let { - loadContent(it, durChapterIndex.plus(1)) launch(IO) { - for (i in 2..10) { - delay(1000L) + for (i in 0..10) { + delay(100) bookData.value?.let { book -> download(book, durChapterIndex + i) } @@ -254,7 +253,14 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { curTextChapter = prevTextChapter prevTextChapter = null bookData.value?.let { - loadContent(it, durChapterIndex.minus(1)) + launch(IO) { + for (i in -5..0) { + delay(100) + bookData.value?.let { book -> + download(book, durChapterIndex + i) + } + } + } } }