[2.15.0][V2N] 优化预警边框展示和消失逻辑

This commit is contained in:
renwj
2023-04-18 11:29:40 +08:00
parent 6896faa698
commit 3dd02556bf
4 changed files with 3 additions and 5 deletions

View File

@@ -121,7 +121,6 @@ class MoGoHmiProvider : IMoGoHmiProvider {
return
}
listener?.onShow()
CallerV2XWarningListenerManager.dismiss()
CallerV2XWarningListenerManager.show(v2xType, direction, expireTime)
CallerLogger.d(
"$M_HMI$TAG",

View File

@@ -63,6 +63,8 @@ class V2XWarningView @JvmOverloads constructor(
private fun showWarning(direction: WarningDirectionEnum, time: Long = ALL_CLOSE_TIMER) {
// 如果传入的不是关闭显示,则设置倒计时,定时关闭红框警示
if (oldDirection.get() == direction) {
removeCallbacks(closeWarningTask)
postDelayed(closeWarningTask, time)
return
}
if (direction != ALERT_WARNING_NON) {
@@ -225,6 +227,7 @@ class V2XWarningView @JvmOverloads constructor(
}
}
clearAnimation()
this.oldDirection.set(null)
}
}