From 8fd0816dff8ad0eef7152bdfe106aacd30332da0 Mon Sep 17 00:00:00 2001 From: aibingbing Date: Thu, 11 Jul 2024 17:36:15 +0800 Subject: [PATCH] =?UTF-8?q?[6.5.0][=E4=BA=8B=E4=BB=B6=E5=BC=B9=E6=A1=86]?= =?UTF-8?q?=20refactor:=20=E6=98=AF=E5=90=A6=E5=9C=A8=E9=AB=98=E7=B2=BE?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E9=A1=B5=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=B8=BB=E5=8A=A8=E6=9F=A5=E6=96=B9=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function/hmi/ui/v2n/RoadV2NEventWindowView.kt | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/v2n/RoadV2NEventWindowView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/v2n/RoadV2NEventWindowView.kt index b9d11f326e..6097c22c9d 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/v2n/RoadV2NEventWindowView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/v2n/RoadV2NEventWindowView.kt @@ -18,7 +18,6 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.v2x.RoadV2NEventType import com.mogo.eagle.core.data.v2x.RoadV2NEventWindowBean import com.mogo.eagle.core.function.api.hmi.v2n.IRoadV2NEventWindowListener -import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager import com.mogo.eagle.core.function.call.hmi.CallerRoadV2NEventWindowListenerManager @@ -49,8 +48,7 @@ class RoadV2NEventWindowView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 -) : ConstraintLayout(context, attrs, defStyleAttr), IRoadV2NEventWindowListener, - IViewControlListener { +) : ConstraintLayout(context, attrs, defStyleAttr), IRoadV2NEventWindowListener { companion object { const val TAG = "RoadV2NEventWindowView" @@ -75,9 +73,6 @@ class RoadV2NEventWindowView @JvmOverloads constructor( private var currentEventUUID: String = "" - // 只有在高精地图的tab才展示事件弹框 - private var canShowV2NEventWindowView = true - init { LayoutInflater.from(context).inflate(R.layout.hmi_view_road_v2n_event_window, this, true) } @@ -274,18 +269,17 @@ class RoadV2NEventWindowView @JvmOverloads constructor( override fun onAttachedToWindow() { super.onAttachedToWindow() CallerRoadV2NEventWindowListenerManager.addListener(TAG, this) - CallerHmiViewControlListenerManager.addListener(TAG, this) initView() } override fun onDetachedFromWindow() { super.onDetachedFromWindow() CallerRoadV2NEventWindowListenerManager.removeListener(TAG) - CallerHmiViewControlListenerManager.removeListener(TAG) } override fun show(dataBean: RoadV2NEventWindowBean) { trackEvent("show --> ${dataBean.toString()}") + val canShowV2NEventWindowView = CallerHmiViewControlListenerManager.getMainPageVisible() if (!canShowV2NEventWindowView) { trackEvent("show --> 当前不在高精地图页面,跳过") return @@ -353,9 +347,4 @@ class RoadV2NEventWindowView @JvmOverloads constructor( } } } - - override fun mainPageViewVisible(v: Int) { - canShowV2NEventWindowView = (View.VISIBLE == v) - trackEvent("mainPageViewVisible --> $canShowV2NEventWindowView") - } } \ No newline at end of file