diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/MMsgBoxButtonView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/MMsgBoxButtonView.kt index e3c29a00c8..6da401c2f6 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/MMsgBoxButtonView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/MMsgBoxButtonView.kt @@ -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 + } } \ No newline at end of file