|
@@ -1709,22 +1709,6 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
binding.ivWeight.visibility = View.GONE
|
|
|
binding.tvModeName.text = viewModel.getModeTitle(resources)
|
|
|
|
|
|
- val workMode = ConfigUtils.getMode(modeType)
|
|
|
- if (!isNightTheme()) {
|
|
|
- if (workMode == null) {
|
|
|
- Glide.with(this).load(com.develop.common.R.drawable.ic_mode_diy)
|
|
|
- .into(binding.ivBanner)
|
|
|
- } else {
|
|
|
- Glide.with(this).load(
|
|
|
- resources.getIdentifier(
|
|
|
- workMode.bg,
|
|
|
- "drawable",
|
|
|
- this.packageName
|
|
|
- )
|
|
|
- )
|
|
|
- .into(binding.ivBanner)
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1744,22 +1728,6 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
binding.ivWeight.visibility = View.GONE
|
|
|
Log.d("dddddd", "llTurboView===VISIBLE")
|
|
|
binding.llTurboView.visibility = View.VISIBLE
|
|
|
- val workMode = ConfigUtils.getMode(modeType)
|
|
|
- if (!isNightTheme()) {
|
|
|
- if (workMode == null) {
|
|
|
- Glide.with(this).load(com.develop.common.R.drawable.ic_mode_diy)
|
|
|
- .into(binding.ivBanner)
|
|
|
- } else {
|
|
|
- Glide.with(this).load(
|
|
|
- resources.getIdentifier(
|
|
|
- workMode.bg,
|
|
|
- "drawable",
|
|
|
- this.packageName
|
|
|
- )
|
|
|
- )
|
|
|
- .into(binding.ivBanner)
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1777,7 +1745,6 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
*/
|
|
|
private fun backClick() {
|
|
|
if (modeChange) {
|
|
|
-
|
|
|
if (modeType == ModesType.TURBO.name) { //TURBO未停止之前不能退出
|
|
|
CofarSDK.stop(false)
|
|
|
if (DevStatus.STOP != CofarSDK.devInfo().status.toByte()) {
|
|
@@ -1788,24 +1755,35 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
|
// turboLock = true
|
|
|
// ThreadUtils.runOnMainThread({turboLock = false},2000);
|
|
|
}
|
|
|
- ThreadUtils.runOnMainThread({
|
|
|
+ ThreadUtils.runOnMainThread {
|
|
|
var cm = viewModel.modeType;
|
|
|
modeType = viewModel.lastModeType
|
|
|
viewModel.modeType = viewModel.lastModeType
|
|
|
//binding.tvModeName.text = viewModel.getModeTitle(resources)
|
|
|
var workMode = ConfigUtils.getMode(modeType)
|
|
|
- binding.tvModeName.text =
|
|
|
- getString(resources.getIdentifier(workMode?.name, "string", this.packageName))
|
|
|
-
|
|
|
if (!isNightTheme()) {
|
|
|
- Glide.with(this).load(viewModel.getBanner()).into(binding.ivBanner)
|
|
|
+ if (workMode == null) {
|
|
|
+ Glide.with(this).load(com.develop.common.R.drawable.ic_mode_diy)
|
|
|
+ .into(binding.ivBanner)
|
|
|
+ } else {
|
|
|
+ Glide.with(this).load(
|
|
|
+ resources.getIdentifier(
|
|
|
+ workMode.bg,
|
|
|
+ "drawable",
|
|
|
+ this.packageName
|
|
|
+ )
|
|
|
+ )
|
|
|
+ .into(binding.ivBanner)
|
|
|
+ }
|
|
|
}
|
|
|
+ binding.tvModeName.text =
|
|
|
+ getString(resources.getIdentifier(workMode?.name, "string", this.packageName))
|
|
|
modeChange = false
|
|
|
Log.d("dddddd", "llTurboView===GONE")
|
|
|
binding.llTurboView.visibility = View.GONE
|
|
|
initModeData(modeType, cm == ModesType.WIGHT.name || cm == ModesType.TURBO.name)
|
|
|
changeCommonStep()
|
|
|
- }, 1000)
|
|
|
+ }
|
|
|
|
|
|
} else if (mRunningState != 0 && viewModel.modeType != ModesType.WIGHT.name && viewModel.modeType != ModesType.TURBO.name) {
|
|
|
if (CofarSDK.devInfo().runningInstId == viewModel.modeType) backRequestDialog.showDialog(
|