parent
3f3593c616
commit
09e94d8b5c
@ -1,9 +1,22 @@ |
||||
package io.legado.app.ui.main |
||||
|
||||
import android.app.Application |
||||
import androidx.lifecycle.AndroidViewModel |
||||
import io.legado.app.App |
||||
import io.legado.app.base.BaseViewModel |
||||
import kotlinx.coroutines.async |
||||
import org.jetbrains.anko.toast |
||||
|
||||
class MainViewModel(application: Application) : AndroidViewModel(application) { |
||||
class MainViewModel(application: Application) : BaseViewModel(application) { |
||||
|
||||
fun test() { |
||||
launchOnUI({ |
||||
|
||||
val result = async { |
||||
"结果" |
||||
} |
||||
|
||||
// App.INSTANCE.toast("result: $result") |
||||
}) |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue