diff --git a/app/src/main/java/io/legado/app/service/ReadAloudService.kt b/app/src/main/java/io/legado/app/service/ReadAloudService.kt index ddfaae1f8..61d9ff5f3 100644 --- a/app/src/main/java/io/legado/app/service/ReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/ReadAloudService.kt @@ -230,13 +230,19 @@ class ReadAloudService : BaseService(), TextToSpeech.OnInitListener, AudioManage } private fun prevP() { - nowSpeak++ - playTTS() + if (nowSpeak < contentList.size - 1) { + readAloudNumber += contentList[nowSpeak].length + nowSpeak++ + playTTS() + } } private fun nextP() { - nowSpeak-- - playTTS() + if (nowSpeak > 0) { + nowSpeak-- + readAloudNumber -= contentList[nowSpeak].length + playTTS() + } } /**