[V2X]优化弹窗展示逻辑
This commit is contained in:
@@ -587,7 +587,7 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
activity?.let {
|
||||
val floatWindow = mWarningFloat
|
||||
val showTag = floatWindow?.config?.floatTag
|
||||
if (floatWindow == null || TextUtils.isEmpty(showTag) || !floatWindow.isShow()) {
|
||||
if (floatWindow == null || TextUtils.isEmpty(showTag) || !floatWindow.isShow() || floatWindow.config.floatTag != tag) {
|
||||
val notificationView = V2XNotificationView(it)
|
||||
notificationView.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType.toString()))
|
||||
val warningContent = alertContent ?: EventTypeEnum.getWarningContent(v2xType.toString())
|
||||
@@ -597,8 +597,8 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
} else {
|
||||
notificationView.setWarningContent(warningContent)
|
||||
}
|
||||
if (mWarningFloat != null && mWarningFloat!!.config.floatTag != tag) {
|
||||
WarningFloat.dismiss(mWarningFloat!!.config.floatTag, true)
|
||||
if (floatWindow != null && floatWindow.isShow()) {
|
||||
WarningFloat.dismiss(floatWindow.config.floatTag, true)
|
||||
}
|
||||
mWarningFloat = WarningFloat.with(it)
|
||||
.setTag(tag)
|
||||
|
||||
Reference in New Issue
Block a user