From b202076870fc51da32e86e6dddb187dab88b1399 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 27 Nov 2019 17:37:04 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/service/BaseReadAloudService.kt | 3 +++ .../main/java/io/legado/app/service/HttpReadAloudService.kt | 2 +- app/src/main/java/io/legado/app/service/TTSReadAloudService.kt | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) 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() } }