[6.7.0] close the callbiz and update tab notice io

This commit is contained in:
EmArrow
2024-09-18 10:52:48 +08:00
parent f6f6d8b306
commit 85d510e578
3 changed files with 28 additions and 7 deletions

View File

@@ -4,6 +4,8 @@ import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
@@ -18,9 +20,9 @@ class BoneTabLayout @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
companion object{
companion object {
private const val TAG = "BoneTabLayout"
}
@@ -42,13 +44,23 @@ class BoneTabLayout @JvmOverloads constructor(
}
}
private var logOut:(() -> Unit)? = null
private var logOut: (() -> Unit)? = null
init {
LayoutInflater.from(context).inflate(R.layout.view_bone_tab, this, true)
initView()
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerMsgBoxEventListenerManager.addListener(TAG, this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerMsgBoxEventListenerManager.removeListener(TAG)
}
private fun initView() {
tabSwitchCarInfo.setOnClickListener {
updateTabType(TabType.CAR_INFO)
@@ -69,15 +81,15 @@ class BoneTabLayout @JvmOverloads constructor(
}
fun setCarNo(carNo: String){
fun setCarNo(carNo: String) {
carInfoTabView.setCarNo(carNo)
}
fun setLoginInfo(loginNo: String){
fun setLoginInfo(loginNo: String) {
carInfoTabView.setLoginInfo(loginNo)
}
fun loginOut(logOut:(() -> Unit)){
fun loginOut(logOut: (() -> Unit)) {
this.logOut = logOut
}
@@ -128,4 +140,8 @@ class BoneTabLayout @JvmOverloads constructor(
}
}
override fun onUpdateTipEvent(isShow: Boolean) {
super.onUpdateTipEvent(isShow)
tabSwitchMsgBox.updateNotice(isShow)
}
}

View File

@@ -9,6 +9,7 @@ import com.mogo.eagle.core.function.hmi.R
import kotlinx.android.synthetic.main.view_tab_switch.view.ivTabClick
import kotlinx.android.synthetic.main.view_tab_switch.view.ivTabClickBg
import kotlinx.android.synthetic.main.view_tab_switch.view.ivTabDefault
import kotlinx.android.synthetic.main.view_tab_switch.view.vTabNotice
class TabSwitchView @JvmOverloads constructor(
context: Context,
@@ -55,4 +56,8 @@ class TabSwitchView @JvmOverloads constructor(
}
}
fun updateNotice(check: Boolean) {
vTabNotice.visibility = if (check) View.VISIBLE else View.GONE
}
}

View File

@@ -81,7 +81,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
// BIZ
MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_FUNC_BIZ, "IMoGoNoticeProvider"));
// 后置 车聊聊IM
MogoModulePaths.addModuleFunctionServer(new MogoModule(ChatConsts.CHAT_PROVIDER_PATH, ChatConsts.CHAT_MODULE_NAME));
// MogoModulePaths.addModuleFunctionServer(new MogoModule(ChatConsts.CHAT_PROVIDER_PATH, ChatConsts.CHAT_MODULE_NAME));
// 司机身份专属
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
// 后置 地图数据收集模块