This commit is contained in:
Horis
2024-08-24 20:24:40 +08:00
parent 8acb1aac1b
commit 32490260f8
3 changed files with 3 additions and 1 deletions

View File

@@ -446,7 +446,7 @@ object BookHelp {
newChapterList: List<BookChapter>,
oldChapterListSize: Int = 0
): Int {
if (oldDurChapterIndex == 0) return 0
if (oldDurChapterIndex <= 0) return 0
if (newChapterList.isEmpty()) return oldDurChapterIndex
val oldChapterNum = getChapterNum(oldDurChapterName)
val oldName = getPureChapterName(oldDurChapterName)

View File

@@ -78,6 +78,7 @@ object AudioPlay : CoroutineScope by MainScope() {
durPlayUrl = ""
durAudioSize = 0
upDurChapter()
postEvent(EventBus.AUDIO_BUFFER_PROGRESS, 0)
}
private fun addLoading(index: Int): Boolean {

View File

@@ -766,6 +766,7 @@ object ReadBook : CoroutineScope by MainScope() {
appDb.bookChapterDao.insert(*cList.toTypedArray())
saveRead()
chapterSize = cList.size
simulatedChapterSize = book.simulatedTotalChapterNum()
nextTextChapter ?: loadContent(durChapterIndex + 1)
}
}