From 34c6a6ced4fd2c339f5bbe49e67a3e3960348546 Mon Sep 17 00:00:00 2001 From: gouri-panda Date: Tue, 1 Sep 2020 16:37:33 +0530 Subject: [PATCH] formated code --- .../kiwixmobile/core/main/KiwixTextToSpeech.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixTextToSpeech.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixTextToSpeech.kt index a7a36bf48..0e2c59f35 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixTextToSpeech.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixTextToSpeech.kt @@ -154,12 +154,10 @@ class KiwixTextToSpeech internal constructor( } fun stop() { - tts.let { - if (it.stop() == SUCCESS) { - currentTTSTask = null - it.setOnUtteranceProgressListener(null) - onSpeakingListener.onSpeakingEnded() - } + if (tts.stop() == SUCCESS) { + currentTTSTask = null + tts.setOnUtteranceProgressListener(null) + onSpeakingListener.onSpeakingEnded() } } @@ -230,7 +228,9 @@ class KiwixTextToSpeech internal constructor( } fun start() { - if (!paused) return + if (!paused) { + return + } paused = false // The utterance ID isn't actually used anywhere, the param is passed only to force // the utterance listener to be notified