[2.15.0] 修正状态栏中的状态偶现与调试面板不一致的问题
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user