diff --git a/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt b/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt index f6325732e..1eeb010a0 100644 --- a/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt @@ -325,4 +325,7 @@ abstract class BaseReadAloudService : BaseService(), abstract fun aloudServicePendingIntent(actionStr: String): PendingIntent? + open fun nextChapter() { + postEvent(Bus.TTS_TURN_PAGE, 2) + } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt index c2cfc2de6..30e7abae8 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -194,7 +194,7 @@ class HttpReadAloudService : BaseReadAloudService(), nowSpeak++ play() } else { - postEvent(Bus.TTS_TURN_PAGE, 2) + nextChapter() } } diff --git a/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt b/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt index e3fc37479..888afbc99 100644 --- a/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt @@ -164,7 +164,7 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener readAloudNumber += contentList[nowSpeak].length + 1 nowSpeak++ if (nowSpeak >= contentList.size) { - postEvent(Bus.TTS_TURN_PAGE, 2) + nextChapter() } }