pull/36/head
kunfei 5 years ago
parent a73dd8a20d
commit ddb55cfc52
  1. 2
      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<T> {
return Coroutine.async(scope) { block() }
return Coroutine.async(scope, context) { block() }
}
fun <R> submit(

Loading…
Cancel
Save