Merge remote-tracking branch 'origin/dev_260316_新设备' into dev_260316_新设备

This commit is contained in:
2026-05-19 14:55:18 +08:00
4 changed files with 4 additions and 4 deletions
@@ -43,7 +43,7 @@ class ScaleRowAdapter : BaseQuickAdapter<ScaleRowAdapter.ScaleItem, ScaleRowAdap
holder.b.tvState.text = when (item.state) {
WeightUtil.STATE_STABLE -> "稳定"
WeightUtil.STATE_UNSTABLE -> "不稳定"
WeightUtil.STATE_OVER_WEIGHT -> ""
WeightUtil.STATE_OVER_WEIGHT -> "程溢出"
else -> "${item.state}"
}
// 点击时通过 bindingAdapterPosition 取最新数据,避免闭包捕获过期 item
@@ -168,7 +168,7 @@ class Seasoning18GridAdapter(
private fun stateStr(state: Int) = when (state) {
WeightUtil.STATE_STABLE -> "稳定"
WeightUtil.STATE_UNSTABLE -> "不稳定"
WeightUtil.STATE_OVER_WEIGHT -> ""
WeightUtil.STATE_OVER_WEIGHT -> "程溢出"
else -> ""
}
}
@@ -174,7 +174,7 @@ class Seasoning22GridAdapter(
private fun stateStr(state: Int) = when (state) {
WeightUtil.STATE_STABLE -> "稳定"
WeightUtil.STATE_UNSTABLE -> "不稳定"
WeightUtil.STATE_OVER_WEIGHT -> ""
WeightUtil.STATE_OVER_WEIGHT -> "程溢出"
else -> ""
}
}
@@ -459,7 +459,7 @@ class MasterScaleActivity : BaseActivity() {
private fun stateStr(state: Int?) = when (state) {
WeightUtil.STATE_STABLE -> "稳定"
WeightUtil.STATE_UNSTABLE -> "不稳定"
WeightUtil.STATE_OVER_WEIGHT -> ""
WeightUtil.STATE_OVER_WEIGHT -> "程溢出"
null -> ""
else -> "$state"
}