|
|
@ -4,11 +4,9 @@ import android.app.Application |
|
|
|
import androidx.lifecycle.AndroidViewModel |
|
|
|
import androidx.lifecycle.AndroidViewModel |
|
|
|
import kotlinx.coroutines.* |
|
|
|
import kotlinx.coroutines.* |
|
|
|
import org.jetbrains.anko.AnkoLogger |
|
|
|
import org.jetbrains.anko.AnkoLogger |
|
|
|
import kotlin.coroutines.CoroutineContext |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
open class BaseViewModel(application: Application) : AndroidViewModel(application), CoroutineScope, AnkoLogger { |
|
|
|
open class BaseViewModel(application: Application) : AndroidViewModel(application), |
|
|
|
override val coroutineContext: CoroutineContext |
|
|
|
CoroutineScope by MainScope(), AnkoLogger { |
|
|
|
get() = Dispatchers.Main |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private val launchManager: MutableList<Job> = mutableListOf() |
|
|
|
private val launchManager: MutableList<Job> = mutableListOf() |
|
|
|
|
|
|
|
|
|
|
|