pull/32/head
kunfei 5 years ago
parent 25da02eed5
commit 5af6820f30
  1. 12
      app/src/main/java/io/legado/app/service/ReadAloudService.kt

@ -230,17 +230,17 @@ class ReadAloudService : BaseService(), TextToSpeech.OnInitListener, AudioManage
} }
private fun prevP() { private fun prevP() {
if (nowSpeak < contentList.size - 1) { if (nowSpeak > 0) {
readAloudNumber += contentList[nowSpeak].length nowSpeak--
nowSpeak++ readAloudNumber -= contentList[nowSpeak].length
playTTS() playTTS()
} }
} }
private fun nextP() { private fun nextP() {
if (nowSpeak > 0) { if (nowSpeak < contentList.size - 1) {
nowSpeak-- readAloudNumber += contentList[nowSpeak].length
readAloudNumber -= contentList[nowSpeak].length nowSpeak++
playTTS() playTTS()
} }
} }

Loading…
Cancel
Save