|
|
@ -140,8 +140,8 @@ object ReadBook { |
|
|
|
loadContent(durChapterIndex.plus(1), upContent, false) |
|
|
|
loadContent(durChapterIndex.plus(1), upContent, false) |
|
|
|
GlobalScope.launch(Dispatchers.IO) { |
|
|
|
GlobalScope.launch(Dispatchers.IO) { |
|
|
|
val maxChapterIndex = |
|
|
|
val maxChapterIndex = |
|
|
|
min(chapterSize, durChapterIndex + AppConfig.preDownloadNum) |
|
|
|
min(chapterSize - 1, durChapterIndex + AppConfig.preDownloadNum) |
|
|
|
for (i in 2 until maxChapterIndex) { |
|
|
|
for (i in 2..maxChapterIndex) { |
|
|
|
delay(1000) |
|
|
|
delay(1000) |
|
|
|
download(durChapterIndex + i) |
|
|
|
download(durChapterIndex + i) |
|
|
|
} |
|
|
|
} |
|
|
@ -172,8 +172,8 @@ object ReadBook { |
|
|
|
loadContent(durChapterIndex.minus(1), upContent, false) |
|
|
|
loadContent(durChapterIndex.minus(1), upContent, false) |
|
|
|
GlobalScope.launch(Dispatchers.IO) { |
|
|
|
GlobalScope.launch(Dispatchers.IO) { |
|
|
|
val maxChapterIndex = |
|
|
|
val maxChapterIndex = |
|
|
|
min(chapterSize, durChapterIndex + AppConfig.preDownloadNum) |
|
|
|
min(chapterSize - 1, durChapterIndex + AppConfig.preDownloadNum) |
|
|
|
for (i in 2 until maxChapterIndex) { |
|
|
|
for (i in 2..maxChapterIndex) { |
|
|
|
delay(1000) |
|
|
|
delay(1000) |
|
|
|
download(durChapterIndex - i) |
|
|
|
download(durChapterIndex - i) |
|
|
|
} |
|
|
|
} |
|
|
|