[6.7.0] fix bug

This commit is contained in:
EmArrow
2024-09-23 19:32:09 +08:00
parent 7b707e8bc9
commit e4f281cafc
10 changed files with 43 additions and 132 deletions

View File

@@ -5,6 +5,7 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.enums.Carmodel
import com.mogo.eagle.core.function.api.och.IOchFunctionCall
import com.mogo.eagle.core.function.call.och.CallerOchFunctionCallManager
import com.mogo.eagle.core.function.hmi.R
@@ -40,12 +41,8 @@ class BoneContainerView @JvmOverloads constructor(
}
private fun initView() {
clBoneTab.loginOut { //todo 判断没有logout caller出去
if(logOut != null){
logOut?.invoke()
}else{
}
clBoneTab.loginOut {
CallerOchFunctionCallManager.invokeLoginOut()
}
}
@@ -57,7 +54,7 @@ class BoneContainerView @JvmOverloads constructor(
this.logOut = logOut
}
override fun invokeCarMode(carModel: String?) {
override fun invokeCarMode(carModel: Carmodel?) {
super.invokeCarMode(carModel)
clBoneTab.setCarMode(carModel)
}

View File

@@ -4,6 +4,7 @@ import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.enums.Carmodel
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
@@ -92,7 +93,7 @@ class BoneTabLayout @JvmOverloads constructor(
carInfoTabView.setLoginInfo(loginNo)
}
fun setCarMode(carModel: String?) {
fun setCarMode(carModel: Carmodel?) {
carInfoTabView.setCarMode(carModel)
}

View File

@@ -6,6 +6,7 @@ import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.commons.storage.SharedPrefsMgr
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.enums.Carmodel
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
@@ -168,19 +169,13 @@ class CarInfoTabView @JvmOverloads constructor(
}
}
fun setCarMode(carModel:String?){
fun setCarMode(carModel: Carmodel?){
UiThreadHandler.post {
if(carModel.isNullOrEmpty()){
if(carModel == null){
ivCarType.visibility = GONE
}else{
ivCarType.visibility = VISIBLE
when(carModel){
"b1" -> ivCarType.setImageResource(R.drawable.icon_car_b1)
"b2" -> ivCarType.setImageResource(R.drawable.icon_car_b2)
"t1" -> ivCarType.setImageResource(R.drawable.icon_car_t1)
"t2" -> ivCarType.setImageResource(R.drawable.icon_car_t2)
"m1" -> ivCarType.setImageResource(R.drawable.icon_car_m1)
}
ivCarType.setImageResource(carModel.resId)
}
}
}