[Opt3.0]消息盒子

This commit is contained in:
xuxinchao
2023-02-01 16:26:53 +08:00
parent ab2a89a623
commit f9eeef8cb9
30 changed files with 554 additions and 188 deletions

View File

@@ -327,20 +327,6 @@ object CallerHmiManager {
waringProviderApi?.updateStatusBarLeftView(insert, tag, viewGroup)
}
/**
* 设置司机端消息盒子是否展示
*/
fun updateDriverMsgBoxTipView(show: Boolean = false) {
waringProviderApi?.updateDriverMsgBoxTipView(show)
}
/**
* 设置乘客端消息盒子是否展示
*/
fun updatePassengerMsgBoxTipView(show: Boolean = false) {
waringProviderApi?.updatePassengerMsgBoxTipView(show)
}
/**
* 更新(添加/删除)状态栏右侧元素
*/

View File

@@ -1,6 +1,7 @@
package com.mogo.eagle.core.function.call.msgbox
import androidx.annotation.Nullable
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.call.base.CallerBase
import java.util.concurrent.ConcurrentHashMap
@@ -12,19 +13,60 @@ import java.util.concurrent.ConcurrentHashMap
*/
object CallerMsgBoxEventListenerManager: CallerBase<IMsgBoxEventListener>() {
private val statusListeners: ConcurrentHashMap<String, IMsgBoxEventListener> =
ConcurrentHashMap()
/**
* 触发监听
* 触发汇总报告点击事件监听
*/
fun invokeListener(){
statusListeners.forEach {
fun invokeSummaryListener(){
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onSummaryClickEvent()
}
}
/**
* 更新消息提示View展示状态
*/
fun invokeUpdateTipListener(isShow: Boolean){
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onUpdateTipEvent(isShow)
}
}
/**
* 气泡态运营平台事件点击监听
**/
fun invokeBubbleOperationListener(msgBoxBean: MsgBoxBean){
M_LISTENERS.forEach{
val tag = it.key
val listener = it.value
listener.onBubbleOperationClickEvent(msgBoxBean)
}
}
/**
* 气泡态V2X消息事件点击监听
*/
fun invokeBubbleV2XListener(msgBoxBean: MsgBoxBean){
M_LISTENERS.forEach{
val tag = it.key
val listener = it.value
listener.onBubbleV2XClickEvent(msgBoxBean)
}
}
/**
* 气泡态上报消息事件点击监听
*/
fun invokeBubbleReportListener(msgBoxBean: MsgBoxBean){
M_LISTENERS.forEach{
val tag = it.key
val listener = it.value
listener.onBubbleReportClickEvent(msgBoxBean)
}
}
}