From 4c67bbd1564a1f37f7731f7b692ef2d70c78a97e Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 1 Mar 2022 19:22:19 +0100 Subject: [PATCH] Update kotlinx-coroutines to version 1.6.0 --- .../legacy/src/main/java/com/fsck/k9/ui/FlowExtensions.kt | 6 +++--- build.gradle | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/FlowExtensions.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/FlowExtensions.kt index 61689a8e5..d1c6e6267 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/FlowExtensions.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/FlowExtensions.kt @@ -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 Flow.observe(lifecycleOwner: LifecycleOwner, action: suspend (T) -> Unit) { +fun Flow.observe(lifecycleOwner: LifecycleOwner, collector: FlowCollector) { lifecycleOwner.lifecycleScope.launch { lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) { - collect(action) + collect(collector) } } } diff --git a/build.gradle b/build.gradle index b0ab63ac3..c5310d62d 100644 --- a/build.gradle +++ b/build.gradle @@ -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',