|
|
@ -114,7 +114,11 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
curTextChapter = nextTextChapter |
|
|
|
curTextChapter = nextTextChapter |
|
|
|
nextTextChapter = null |
|
|
|
nextTextChapter = null |
|
|
|
bookData.value?.let { |
|
|
|
bookData.value?.let { |
|
|
|
|
|
|
|
if (curTextChapter == null) { |
|
|
|
loadContent(it, durChapterIndex) |
|
|
|
loadContent(it, durChapterIndex) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
callBack?.upContent() |
|
|
|
|
|
|
|
} |
|
|
|
loadContent(it, durChapterIndex.plus(1)) |
|
|
|
loadContent(it, durChapterIndex.plus(1)) |
|
|
|
launch(IO) { |
|
|
|
launch(IO) { |
|
|
|
for (i in 2..10) { |
|
|
|
for (i in 2..10) { |
|
|
@ -133,7 +137,11 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
curTextChapter = prevTextChapter |
|
|
|
curTextChapter = prevTextChapter |
|
|
|
prevTextChapter = null |
|
|
|
prevTextChapter = null |
|
|
|
bookData.value?.let { |
|
|
|
bookData.value?.let { |
|
|
|
|
|
|
|
if (curTextChapter == null) { |
|
|
|
loadContent(it, durChapterIndex) |
|
|
|
loadContent(it, durChapterIndex) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
callBack?.upContent() |
|
|
|
|
|
|
|
} |
|
|
|
loadContent(it, durChapterIndex.minus(1)) |
|
|
|
loadContent(it, durChapterIndex.minus(1)) |
|
|
|
launch(IO) { |
|
|
|
launch(IO) { |
|
|
|
for (i in -5..-2) { |
|
|
|
for (i in -5..-2) { |
|
|
|