pull/49/head
kunfei 5 years ago
parent 085b1012ee
commit b202076870
  1. 3
      app/src/main/java/io/legado/app/service/BaseReadAloudService.kt
  2. 2
      app/src/main/java/io/legado/app/service/HttpReadAloudService.kt
  3. 2
      app/src/main/java/io/legado/app/service/TTSReadAloudService.kt

@ -325,4 +325,7 @@ abstract class BaseReadAloudService : BaseService(),
abstract fun aloudServicePendingIntent(actionStr: String): PendingIntent? abstract fun aloudServicePendingIntent(actionStr: String): PendingIntent?
open fun nextChapter() {
postEvent(Bus.TTS_TURN_PAGE, 2)
}
} }

@ -194,7 +194,7 @@ class HttpReadAloudService : BaseReadAloudService(),
nowSpeak++ nowSpeak++
play() play()
} else { } else {
postEvent(Bus.TTS_TURN_PAGE, 2) nextChapter()
} }
} }

@ -164,7 +164,7 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener
readAloudNumber += contentList[nowSpeak].length + 1 readAloudNumber += contentList[nowSpeak].length + 1
nowSpeak++ nowSpeak++
if (nowSpeak >= contentList.size) { if (nowSpeak >= contentList.size) {
postEvent(Bus.TTS_TURN_PAGE, 2) nextChapter()
} }
} }

Loading…
Cancel
Save