mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user