fix(activity): 修复 SlaveActivity 负值清零后误触发高亮的问题
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -150,7 +150,9 @@ class SlaveActivity : BaseActivity() {
|
|||||||
// 重量快照与高亮判断(在回调线程计算,不涉及 UI)
|
// 重量快照与高亮判断(在回调线程计算,不涉及 UI)
|
||||||
val baseline = weightSnapshot[address]
|
val baseline = weightSnapshot[address]
|
||||||
val shouldHighlight = baseline != null
|
val shouldHighlight = baseline != null
|
||||||
|
&& baseline >= 0.0
|
||||||
&& state == WeightUtil.STATE_STABLE
|
&& state == WeightUtil.STATE_STABLE
|
||||||
|
&& weight > WEIGHT_DELTA_THRESHOLD
|
||||||
&& (weight - baseline) > WEIGHT_DELTA_THRESHOLD
|
&& (weight - baseline) > WEIGHT_DELTA_THRESHOLD
|
||||||
if (baseline == null || state == WeightUtil.STATE_STABLE) {
|
if (baseline == null || state == WeightUtil.STATE_STABLE) {
|
||||||
weightSnapshot[address] = weight
|
weightSnapshot[address] = weight
|
||||||
|
|||||||
Reference in New Issue
Block a user