INNER CODE UNIT · Kotlin
coroutineContext
M66B/FairEmail · app/src/main/java/androidx/lifecycle/CoroutineLiveData.kt:90
private val coroutineContext = context + Dispatchers.Main.immediate
override suspend fun emitSource(source: LiveData<T>): DisposableHandle =
withContext(coroutineContext) {
return@withContext target.emitSource(source)
}
@SuppressLint("NullSafeMutableLiveData")
override suspend fun emit(value: T) =
withContext(coroutineContext) {
target.clearSource()
target.value = value
}
}
internal suspend fun <T> MediatorLiveData<T>.addDisposableSource(
source: LiveData<T>
): EmittedSource =