mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-28 19:45:50 +01:00
Workout page: allow empty values to be displayed
This commit is contained in:
parent
10da6a27ce
commit
3c40f3a9d7
@ -216,10 +216,10 @@ public class GarminWorkoutParser implements ActivitySummaryParser {
|
||||
|
||||
if (physiologicalMetrics != null) {
|
||||
if (physiologicalMetrics.getAerobicEffect() != null) {
|
||||
summaryData.add(TRAINING_EFFECT_AEROBIC, physiologicalMetrics.getAerobicEffect(), UNIT_NONE);
|
||||
summaryData.add(TRAINING_EFFECT_AEROBIC, physiologicalMetrics.getAerobicEffect(), UNIT_NONE, true);
|
||||
}
|
||||
if (physiologicalMetrics.getAnaerobicEffect() != null) {
|
||||
summaryData.add(TRAINING_EFFECT_ANAEROBIC, physiologicalMetrics.getAnaerobicEffect(), UNIT_NONE);
|
||||
summaryData.add(TRAINING_EFFECT_ANAEROBIC, physiologicalMetrics.getAnaerobicEffect(), UNIT_NONE, true);
|
||||
}
|
||||
if (physiologicalMetrics.getMetMax() != null) {
|
||||
summaryData.add(MAXIMUM_OXYGEN_UPTAKE, physiologicalMetrics.getMetMax().floatValue() * 3.5f, UNIT_ML_KG_MIN);
|
||||
|
@ -63,11 +63,19 @@ public class ActivitySummaryData {
|
||||
}
|
||||
|
||||
public void add(final String key, final Number value, final String unit) {
|
||||
add(null, key, value, unit);
|
||||
add(null, key, value, unit, false);
|
||||
}
|
||||
|
||||
public void add(final String key, final Number value, final String unit, boolean forceDisplay) {
|
||||
add(null, key, value, unit, forceDisplay);
|
||||
}
|
||||
|
||||
public void add(final String group, final String key, final Number value, final String unit) {
|
||||
if (value.doubleValue() != 0) {
|
||||
add(group, key, value, unit, false);
|
||||
}
|
||||
|
||||
public void add(final String group, final String key, final Number value, final String unit, boolean forceDisplay) {
|
||||
if (value.doubleValue() != 0 || forceDisplay) {
|
||||
entries.put(key, new ActivitySummarySimpleEntry(group, value, unit));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user