pull/32/head
kunfei 5 years ago
parent fb2f440636
commit 90acdadb9b
  1. 6
      app/src/main/java/io/legado/app/service/ReadAloudService.kt

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

Loading…
Cancel
Save