[2.13.0]消息盒子

This commit is contained in:
xuxinchao
2022-12-01 11:16:36 +08:00
parent d13d4e8d9b
commit 3cd125dbb6
2 changed files with 17 additions and 11 deletions

View File

@@ -18,6 +18,7 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxBubbleAdapter
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_driver_msg_box_bubble.view.*
/**
@@ -53,12 +54,14 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
override fun onDataChanged(category: MsgCategory, msgBoxBean: MsgBoxBean) {
if(category == MsgCategory.RECORD_BAG){
//弹出被动录包弹窗
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
}else{
dataList.add(msgBoxBean)
driverMsgBoxBubbleAdapter?.setData(dataList)
UiThreadHandler.post {
if(category == MsgCategory.RECORD_BAG){
//弹出被动录包弹窗
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
}else{
dataList.add(msgBoxBean)
driverMsgBoxBubbleAdapter?.setData(dataList)
}
}
}

View File

@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxBubbleAdapter
import com.mogo.eagle.core.utilcode.util.BarUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_passenger_msg_box_bubble.view.*
/**
@@ -51,11 +52,13 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
}
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
if(category == MsgCategory.NOTICE){
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|| msgBoxList.type == MsgBoxType.OBU){
dataList.add(msgBoxList)
passengerMsgBoxBubbleAdapter?.setData(dataList)
UiThreadHandler.post {
if(category == MsgCategory.NOTICE){
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|| msgBoxList.type == MsgBoxType.OBU){
dataList.add(msgBoxList)
passengerMsgBoxBubbleAdapter?.setData(dataList)
}
}
}
}