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

This commit is contained in:
Xwite
2022-02-11 17:26:05 +08:00
parent b813947d50
commit dcac87edc5
3 changed files with 1 additions and 2 deletions
@@ -215,6 +215,7 @@ object ReadBook : CoroutineScope by MainScope() {
*/ */
fun readAloud(play: Boolean = true) { fun readAloud(play: Boolean = true) {
book?.let { book?.let {
ReadAloud.upReadAloudClass()
ReadAloud.play(appCtx, play) ReadAloud.play(appCtx, play)
} }
} }
@@ -37,7 +37,6 @@ class HttpTtsEditViewModel(app: Application) : BaseViewModel(app) {
id = httpTTS.id id = httpTTS.id
execute { execute {
appDb.httpTTSDao.insert(httpTTS) appDb.httpTTSDao.insert(httpTTS)
ReadAloud.upReadAloudClass()
}.onSuccess { }.onSuccess {
success?.invoke() success?.invoke()
} }
@@ -112,7 +112,6 @@ class ReadAloudConfigDialog : DialogFragment() {
} }
PreferKey.ttsEngine -> { PreferKey.ttsEngine -> {
upPreferenceSummary(findPreference(key), speakEngineSummary) upPreferenceSummary(findPreference(key), speakEngineSummary)
ReadAloud.upReadAloudClass()
} }
} }
} }