[2.15.0] 修正状态栏中的状态偶现与调试面板不一致的问题

This commit is contained in:
renwj
2023-04-13 19:47:51 +08:00
parent d041d8ef94
commit 2a4ee254df

View File

@@ -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