From ab6eadffa40270f57cd4de77cbc4cb77abd435d0 Mon Sep 17 00:00:00 2001 From: Faltenreich Date: Mon, 1 May 2017 20:03:37 +0200 Subject: [PATCH] Refactoring --- .../com/faltenreich/diaguard/data/entity/Measurement.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Diaguard/src/main/java/com/faltenreich/diaguard/data/entity/Measurement.java b/Diaguard/src/main/java/com/faltenreich/diaguard/data/entity/Measurement.java index 48b567b04..c3b091345 100644 --- a/Diaguard/src/main/java/com/faltenreich/diaguard/data/entity/Measurement.java +++ b/Diaguard/src/main/java/com/faltenreich/diaguard/data/entity/Measurement.java @@ -29,13 +29,11 @@ public enum Category { OXYGEN_SATURATION(OxygenSaturation.class, 9, R.string.oxygen_saturation, false); private Class clazz; - private int maskId; private int stringResId; private boolean stackValues; Category(Class clazz, int maskId, @StringRes int stringResId, boolean stackValues) { this.clazz = clazz; - this.maskId = maskId; this.stringResId = stringResId; this.stackValues = stackValues; } @@ -51,10 +49,6 @@ public String toLocalizedString() { public boolean stackValues() { return stackValues; } - - public int getMaskId() { - return maskId; - } } @DatabaseField(columnName = Column.ENTRY, foreign = true, foreignAutoRefresh = true) @@ -75,7 +69,7 @@ public String[] getValuesForUI() { String[] valuesForUI = new String[values.length]; for (int position = 0; position < values.length; position++) { float value = values[position]; - if (value > 0) { + if (value != 0) { float valueFormatted = PreferenceHelper.getInstance().formatDefaultToCustomUnit(getCategory(), value); valuesForUI[position] = Helper.parseFloat(valueFormatted); }