[690][led]fix bug
This commit is contained in:
@@ -248,12 +248,14 @@ open class BaseLedUIViewModel(protected val writeChainLogListener: IWriteChainLo
|
||||
* 从等待队列中删除目标类型数据
|
||||
*/
|
||||
private fun removeRestoreLedUI(msg: LedUI) {
|
||||
val toRemove = restoreLedUIQueue.filter {
|
||||
it.javaClass == msg.javaClass ||
|
||||
(it is LedUICountDown && it.countDownSeconds > 0
|
||||
&& it.absCountDownTimestamp <= System.currentTimeMillis())
|
||||
synchronized(restoreLedUIQueue) {
|
||||
val queueCopy = restoreLedUIQueue.toList()
|
||||
val toRemove = queueCopy.filter {
|
||||
it.javaClass == msg.javaClass ||
|
||||
(it is LedUICountDown && it.countDownSeconds > 0
|
||||
&& it.absCountDownTimestamp <= System.currentTimeMillis())
|
||||
}
|
||||
restoreLedUIQueue.removeAll(toRemove.toSet())
|
||||
}
|
||||
restoreLedUIQueue.removeAll(toRemove.toSet())
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user