From 99c375d359e36ce12366e9c866d884c26329bcc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petrus=20Nguy=E1=BB=85n=20Th=C3=A1i=20H=E1=BB=8Dc?= Date: Fri, 15 Jul 2022 11:33:10 +0700 Subject: [PATCH] refactor(takeUntil): change `notifier` type to `Flow` (#112) * Flow<*> * Flow --- src/commonMain/kotlin/com/hoc081098/flowext/takeUntil.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commonMain/kotlin/com/hoc081098/flowext/takeUntil.kt b/src/commonMain/kotlin/com/hoc081098/flowext/takeUntil.kt index cdb6973b..ddb4b879 100644 --- a/src/commonMain/kotlin/com/hoc081098/flowext/takeUntil.kt +++ b/src/commonMain/kotlin/com/hoc081098/flowext/takeUntil.kt @@ -40,7 +40,7 @@ import kotlinx.coroutines.launch * @param notifier The [Flow] whose first emitted value or complete event * will cause the output [Flow] of [takeUntil] to stop emitting values from the source [Flow]. */ -public fun Flow.takeUntil(notifier: Flow): Flow = flow { +public fun Flow.takeUntil(notifier: Flow): Flow = flow { try { coroutineScope { val job = launch(start = CoroutineStart.UNDISPATCHED) {