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