From 5af6820f3076bc70bc0511a817bece08c7ab3b2f Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 26 Aug 2019 17:45:22 +0800 Subject: [PATCH] up --- .../java/io/legado/app/service/ReadAloudService.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 61d9ff5f3..5b4e13706 100644 --- a/app/src/main/java/io/legado/app/service/ReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/ReadAloudService.kt @@ -230,17 +230,17 @@ class ReadAloudService : BaseService(), TextToSpeech.OnInitListener, AudioManage } private fun prevP() { - if (nowSpeak < contentList.size - 1) { - readAloudNumber += contentList[nowSpeak].length - nowSpeak++ + if (nowSpeak > 0) { + nowSpeak-- + readAloudNumber -= contentList[nowSpeak].length playTTS() } } private fun nextP() { - if (nowSpeak > 0) { - nowSpeak-- - readAloudNumber -= contentList[nowSpeak].length + if (nowSpeak < contentList.size - 1) { + readAloudNumber += contentList[nowSpeak].length + nowSpeak++ playTTS() } }