mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
优化
This commit is contained in:
parent
078a42d0d8
commit
aff0120775
@ -18,7 +18,12 @@ import io.legado.app.utils.toastOnUi
|
||||
|
||||
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() {
|
||||
execute {
|
||||
|
Loading…
Reference in New Issue
Block a user