|
|
@ -218,21 +218,18 @@ object ReadBook { |
|
|
|
) |
|
|
|
) |
|
|
|
when (chapter.index) { |
|
|
|
when (chapter.index) { |
|
|
|
durChapterIndex -> withContext(Main) { |
|
|
|
durChapterIndex -> withContext(Main) { |
|
|
|
curTextChapter = ChapterProvider |
|
|
|
curTextChapter = ChapterProvider.getTextChapter(chapter, c, chapterSize) |
|
|
|
.getTextChapter(chapter, c, chapterSize) |
|
|
|
|
|
|
|
callBack?.upContent() |
|
|
|
callBack?.upContent() |
|
|
|
callBack?.curChapterChanged() |
|
|
|
callBack?.curChapterChanged() |
|
|
|
curPageChanged() |
|
|
|
curPageChanged() |
|
|
|
callBack?.contentLoadFinish() |
|
|
|
callBack?.contentLoadFinish() |
|
|
|
} |
|
|
|
} |
|
|
|
durChapterIndex - 1 -> withContext(Main) { |
|
|
|
durChapterIndex - 1 -> withContext(Main) { |
|
|
|
prevTextChapter = ChapterProvider |
|
|
|
prevTextChapter = ChapterProvider.getTextChapter(chapter, c, chapterSize) |
|
|
|
.getTextChapter(chapter, c, chapterSize) |
|
|
|
|
|
|
|
callBack?.upContent(-1) |
|
|
|
callBack?.upContent(-1) |
|
|
|
} |
|
|
|
} |
|
|
|
durChapterIndex + 1 -> withContext(Main) { |
|
|
|
durChapterIndex + 1 -> withContext(Main) { |
|
|
|
nextTextChapter = ChapterProvider |
|
|
|
nextTextChapter = ChapterProvider.getTextChapter(chapter, c, chapterSize) |
|
|
|
.getTextChapter(chapter, c, chapterSize) |
|
|
|
|
|
|
|
callBack?.upContent(1) |
|
|
|
callBack?.upContent(1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|