Horis 2 ani în urmă
părinte
comite
f84d884bee

+ 1 - 1
app/src/main/java/io/legado/app/help/book/BookHelp.kt

@@ -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)

+ 1 - 0
app/src/main/java/io/legado/app/model/AudioPlay.kt

@@ -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 {

+ 1 - 0
app/src/main/java/io/legado/app/model/ReadBook.kt

@@ -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)
             }
         }