[3.2.0]核销订单,隐藏消息盒子红点

This commit is contained in:
xuxinchao
2023-05-18 11:57:37 +08:00
parent 9c1c8e4da5
commit 05bdf717af

View File

@@ -7,7 +7,9 @@ import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
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.order.CallerOrderListenerManager
import com.mogo.eagle.core.function.hmi.R
import kotlinx.android.synthetic.main.view_m1_msg_box_button.view.*
@@ -18,7 +20,7 @@ class MMsgBoxButtonView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
): ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
): ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener, IOrderListener {
companion object {
const val TAG = "MMsgBoxButtonView"
@@ -41,11 +43,13 @@ class MMsgBoxButtonView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerMsgBoxEventListenerManager.addListener(TAG,this)
CallerOrderListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerMsgBoxEventListenerManager.removeListener(TAG)
CallerOrderListenerManager.removeListener(TAG)
}
override fun onSummaryClickEvent() {
@@ -84,5 +88,9 @@ class MMsgBoxButtonView @JvmOverloads constructor(
fun showMsgBoxList(show: Boolean)
}
override fun onOrderRemoval() {
//核销订单,去除红点
msgBoxMTipView.visibility = View.GONE
}
}