From aaef0d55cc12b3eac005e2e40f6c2fd9e8892e70 Mon Sep 17 00:00:00 2001 From: GKF Date: Wed, 19 Jun 2019 10:58:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/base/BaseViewModel.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/base/BaseViewModel.kt b/app/src/main/java/io/legado/app/base/BaseViewModel.kt index c647b34bd..ccee0eaeb 100644 --- a/app/src/main/java/io/legado/app/base/BaseViewModel.kt +++ b/app/src/main/java/io/legado/app/base/BaseViewModel.kt @@ -4,11 +4,9 @@ import android.app.Application import androidx.lifecycle.AndroidViewModel import kotlinx.coroutines.* import org.jetbrains.anko.AnkoLogger -import kotlin.coroutines.CoroutineContext -open class BaseViewModel(application: Application) : AndroidViewModel(application), CoroutineScope, AnkoLogger { - override val coroutineContext: CoroutineContext - get() = Dispatchers.Main +open class BaseViewModel(application: Application) : AndroidViewModel(application), + CoroutineScope by MainScope(), AnkoLogger { private val launchManager: MutableList = mutableListOf()