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 d59bb15f7..e9bae2236 100644 --- a/app/src/main/java/io/legado/app/base/BaseViewModel.kt +++ b/app/src/main/java/io/legado/app/base/BaseViewModel.kt @@ -21,7 +21,7 @@ open class BaseViewModel(application: Application) : AndroidViewModel(applicatio context: CoroutineContext = scope.coroutineContext.plus(Dispatchers.IO), block: suspend CoroutineScope.() -> T ): Coroutine { - return Coroutine.async(scope) { block() } + return Coroutine.async(scope, context) { block() } } fun submit(