[Fix]对于warningContent和tts为null或空字符串时不提示
This commit is contained in:
@@ -209,12 +209,13 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
|
||||
val notificationView = V2XNotificationView(it)
|
||||
notificationView.setWarningIcon(EventTypeEnum.getWarningIcon(v2xType.toString()))
|
||||
|
||||
notificationView.setWarningContent(
|
||||
alertContent ?: EventTypeEnum.getWarningContent(
|
||||
v2xType.toString()
|
||||
)
|
||||
)
|
||||
val warningContent = alertContent ?: EventTypeEnum.getWarningContent(v2xType.toString())
|
||||
if (warningContent.isNullOrEmpty()) {
|
||||
Logger.e(TAG, "Show warningContent is null or empty!")
|
||||
return
|
||||
} else {
|
||||
notificationView.setWarningContent(warningContent)
|
||||
}
|
||||
|
||||
if (mWarningFloat != null && mWarningFloat!!.config.floatTag != tag) {
|
||||
WarningFloat.dismiss(mWarningFloat!!.config.floatTag, true)
|
||||
|
||||
Reference in New Issue
Block a user