优化
This commit is contained in:
@@ -446,7 +446,7 @@ object BookHelp {
|
|||||||
newChapterList: List<BookChapter>,
|
newChapterList: List<BookChapter>,
|
||||||
oldChapterListSize: Int = 0
|
oldChapterListSize: Int = 0
|
||||||
): Int {
|
): Int {
|
||||||
if (oldDurChapterIndex == 0) return 0
|
if (oldDurChapterIndex <= 0) return 0
|
||||||
if (newChapterList.isEmpty()) return oldDurChapterIndex
|
if (newChapterList.isEmpty()) return oldDurChapterIndex
|
||||||
val oldChapterNum = getChapterNum(oldDurChapterName)
|
val oldChapterNum = getChapterNum(oldDurChapterName)
|
||||||
val oldName = getPureChapterName(oldDurChapterName)
|
val oldName = getPureChapterName(oldDurChapterName)
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ object AudioPlay : CoroutineScope by MainScope() {
|
|||||||
durPlayUrl = ""
|
durPlayUrl = ""
|
||||||
durAudioSize = 0
|
durAudioSize = 0
|
||||||
upDurChapter()
|
upDurChapter()
|
||||||
|
postEvent(EventBus.AUDIO_BUFFER_PROGRESS, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addLoading(index: Int): Boolean {
|
private fun addLoading(index: Int): Boolean {
|
||||||
|
|||||||
@@ -766,6 +766,7 @@ object ReadBook : CoroutineScope by MainScope() {
|
|||||||
appDb.bookChapterDao.insert(*cList.toTypedArray())
|
appDb.bookChapterDao.insert(*cList.toTypedArray())
|
||||||
saveRead()
|
saveRead()
|
||||||
chapterSize = cList.size
|
chapterSize = cList.size
|
||||||
|
simulatedChapterSize = book.simulatedTotalChapterNum()
|
||||||
nextTextChapter ?: loadContent(durChapterIndex + 1)
|
nextTextChapter ?: loadContent(durChapterIndex + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user