Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c67bbd1 authored by cketti's avatar cketti
Browse files

Update kotlinx-coroutines to version 1.6.0

parent 2c86c196
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -5,13 +5,13 @@ import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.FlowCollector
import kotlinx.coroutines.launch

fun <T> Flow<T>.observe(lifecycleOwner: LifecycleOwner, action: suspend (T) -> Unit) {
fun <T> Flow<T>.observe(lifecycleOwner: LifecycleOwner, collector: FlowCollector<T>) {
    lifecycleOwner.lifecycleScope.launch {
        lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
            collect(action)
            collect(collector)
        }
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ buildscript {

        versions = [
                'kotlin': '1.6.10',
                'kotlinCoroutines': '1.5.2',
                'kotlinCoroutines': '1.6.0',
                'androidxAppCompat': '1.3.1',
                'androidxActivity': '1.4.0',
                'androidxRecyclerView': '1.2.1',