formated code

This commit is contained in:
gouri-panda 2020-09-01 16:37:33 +05:30
parent a18eea8455
commit 34c6a6ced4

View File

@ -154,12 +154,10 @@ class KiwixTextToSpeech internal constructor(
} }
fun stop() { fun stop() {
tts.let { if (tts.stop() == SUCCESS) {
if (it.stop() == SUCCESS) { currentTTSTask = null
currentTTSTask = null tts.setOnUtteranceProgressListener(null)
it.setOnUtteranceProgressListener(null) onSpeakingListener.onSpeakingEnded()
onSpeakingListener.onSpeakingEnded()
}
} }
} }
@ -230,7 +228,9 @@ class KiwixTextToSpeech internal constructor(
} }
fun start() { fun start() {
if (!paused) return if (!paused) {
return
}
paused = false paused = false
// The utterance ID isn't actually used anywhere, the param is passed only to force // The utterance ID isn't actually used anywhere, the param is passed only to force
// the utterance listener to be notified // the utterance listener to be notified