Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Faltenreich committed May 1, 2017
1 parent 2bacdcc commit ab6eadf
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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)
Expand All @@ -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);
}
Expand Down

0 comments on commit ab6eadf

Please sign in to comment.