[2.13.0]消息盒子
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user