parent
c13e6356a2
commit
0ff5f960d5
@ -1,15 +1,15 @@ |
||||
package io.legado.app.ui.main |
||||
|
||||
import android.app.Application |
||||
import androidx.lifecycle.AndroidViewModel |
||||
import io.legado.app.base.BaseViewModel |
||||
import io.legado.app.help.storage.Restore |
||||
import kotlinx.coroutines.GlobalScope |
||||
import kotlinx.coroutines.Dispatchers.IO |
||||
import kotlinx.coroutines.launch |
||||
|
||||
class MainViewModel(application: Application) : AndroidViewModel(application) { |
||||
class MainViewModel(application: Application) : BaseViewModel(application) { |
||||
|
||||
fun restore() { |
||||
GlobalScope.launch { |
||||
launch(IO) { |
||||
Restore.importYueDuData(getApplication()) |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue