|
|
|
@ -234,9 +234,11 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
|
durChapterIndex++ |
|
|
|
|
prevTextChapter = curTextChapter |
|
|
|
|
curTextChapter = nextTextChapter |
|
|
|
|
nextTextChapter = null |
|
|
|
|
bookData.value?.let { |
|
|
|
|
loadContent(it, durChapterIndex.plus(1)) |
|
|
|
|
launch(IO) { |
|
|
|
|
for (i in 0..10) { |
|
|
|
|
for (i in 2..10) { |
|
|
|
|
delay(100) |
|
|
|
|
bookData.value?.let { book -> |
|
|
|
|
download(book, durChapterIndex + i) |
|
|
|
@ -250,9 +252,11 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
|
durChapterIndex-- |
|
|
|
|
nextTextChapter = curTextChapter |
|
|
|
|
curTextChapter = prevTextChapter |
|
|
|
|
prevTextChapter = null |
|
|
|
|
bookData.value?.let { |
|
|
|
|
loadContent(it, durChapterIndex.minus(1)) |
|
|
|
|
launch(IO) { |
|
|
|
|
for (i in -5..0) { |
|
|
|
|
for (i in -5..-2) { |
|
|
|
|
delay(100) |
|
|
|
|
bookData.value?.let { book -> |
|
|
|
|
download(book, durChapterIndex + i) |
|
|
|
|