pull/2343/head
kunfei 2 years ago
parent 078a42d0d8
commit aff0120775
  1. 7
      app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineViewModel.kt

@ -18,7 +18,12 @@ import io.legado.app.utils.toastOnUi
class SpeakEngineViewModel(application: Application) : BaseViewModel(application) { class SpeakEngineViewModel(application: Application) : BaseViewModel(application) {
val sysEngines: List<TextToSpeech.EngineInfo> = TextToSpeech(context, null).engines val sysEngines: List<TextToSpeech.EngineInfo> by lazy {
val tts = TextToSpeech(context, null)
val engines = tts.engines
tts.shutdown()
engines
}
fun importDefault() { fun importDefault() {
execute { execute {

Loading…
Cancel
Save