From 2a4ee254df8ee2a2412d2ab08f2be89212a54a3a Mon Sep 17 00:00:00 2001 From: renwj Date: Thu, 13 Apr 2023 19:47:51 +0800 Subject: [PATCH] =?UTF-8?q?[2.15.0]=20=E4=BF=AE=E6=AD=A3=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=A0=8F=E4=B8=AD=E7=9A=84=E7=8A=B6=E6=80=81=E5=81=B6=E7=8E=B0?= =?UTF-8?q?=E4=B8=8E=E8=B0=83=E8=AF=95=E9=9D=A2=E6=9D=BF=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo_core_function_devatools/status/flow/IFlow.kt | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/IFlow.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/IFlow.kt index 93ed3adf10..7f81c1f4b2 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/IFlow.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/IFlow.kt @@ -18,9 +18,6 @@ internal abstract class IFlow< T : Status>(val ctx: Context) : CoroutineScope { Channel(CONFLATED) } - @Volatile - private var old: T? = null - override val coroutineContext: CoroutineContext get() = ctx.lifeCycleScope.coroutineContext @@ -35,13 +32,7 @@ internal abstract class IFlow< T : Status>(val ctx: Context) : CoroutineScope { } fun send(t: T) { - if (old == t) { - return - } - old = t - launch { - chl.send(t) - } + chl.trySend(t) } @CallSuper