fix:首次朗读后,其他书的tts引擎依然是首次朗读的引擎

pull/1606/head
Xwite 3 years ago
parent b813947d50
commit dcac87edc5
  1. 1
      app/src/main/java/io/legado/app/model/ReadBook.kt
  2. 1
      app/src/main/java/io/legado/app/ui/book/read/config/HttpTtsEditViewModel.kt
  3. 1
      app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudConfigDialog.kt

@ -215,6 +215,7 @@ object ReadBook : CoroutineScope by MainScope() {
*/
fun readAloud(play: Boolean = true) {
book?.let {
ReadAloud.upReadAloudClass()
ReadAloud.play(appCtx, play)
}
}

@ -37,7 +37,6 @@ class HttpTtsEditViewModel(app: Application) : BaseViewModel(app) {
id = httpTTS.id
execute {
appDb.httpTTSDao.insert(httpTTS)
ReadAloud.upReadAloudClass()
}.onSuccess {
success?.invoke()
}

@ -112,7 +112,6 @@ class ReadAloudConfigDialog : DialogFragment() {
}
PreferKey.ttsEngine -> {
upPreferenceSummary(findPreference(key), speakEngineSummary)
ReadAloud.upReadAloudClass()
}
}
}

Loading…
Cancel
Save