[dev_minibus-d_230425_3.2.0]M1乘客屏核销订单删除消息历史缓存
This commit is contained in:
@@ -16,6 +16,9 @@ import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.layout_m_msg_box_bubble.view.*
|
||||
|
||||
/**
|
||||
* M1消息盒子气泡态
|
||||
*/
|
||||
class MMsgBoxBubbleView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
|
||||
@@ -11,6 +11,9 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_m1_msg_box_button.view.*
|
||||
|
||||
/**
|
||||
* M1消息盒子切换按钮
|
||||
*/
|
||||
class MMsgBoxButtonView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
|
||||
@@ -13,20 +13,26 @@ import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.data.msgbox.OperationMsg
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.api.order.IOrderListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.order.CallerOrderListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.MMsgBoxListAdapter
|
||||
import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.layout_m_msg_box_list.view.*
|
||||
|
||||
/**
|
||||
* M1消息盒子列表
|
||||
*/
|
||||
class MMsgBoxListView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener, IMsgBoxEventListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener, IMsgBoxEventListener,
|
||||
IOrderListener {
|
||||
|
||||
private val TAG = "MMsgBoxListView"
|
||||
var mMsgBoxListAdapter: MMsgBoxListAdapter?= null
|
||||
@@ -73,12 +79,14 @@ class MMsgBoxListView @JvmOverloads constructor(
|
||||
super.onAttachedToWindow()
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
CallerOrderListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
CallerMsgBoxEventListenerManager.removeListener(TAG)
|
||||
CallerOrderListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onSummaryClickEvent() {
|
||||
@@ -103,4 +111,13 @@ class MMsgBoxListView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
override fun onOrderRemoval() {
|
||||
//清除历史消息,并刷新列表
|
||||
CallerMsgBoxManager.delMsgTable(context)
|
||||
noticeList?.let {
|
||||
it.clear()
|
||||
mMsgBoxListAdapter?.setData(it)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user