INNER CODE UNIT · Kotlin
onActive
M66B/FairEmail · app/src/main/java/androidx/lifecycle/CoroutineLiveData.kt:232
override fun onActive() {
super.onActive()
blockRunner?.maybeRun()
}
override fun onInactive() {
super.onInactive()
blockRunner?.cancel()
}
}
/**
* Builds a LiveData that has values yielded from the given [block] that executes on a
* [LiveDataScope].
*
* The [block] starts executing when the returned [LiveData] becomes [active](LiveData.onActive). If
* the [LiveData] becomes [inactive](LiveData.onInactive) while the [block] is executing, it will be
* cancelled after [timeoutInMs] milliseconds unless the [LiveData] becomes active again before that