Overview: format target using unit specific format.

This commit is contained in:
Johannes Mockenhaupt 2017-08-15 14:49:12 +02:00
parent 4c490c32f7
commit 6dcdeb2bbc
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -962,9 +962,9 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
double low = MainApp.getConfigBuilder().getProfile().getTargetLow();
double high = MainApp.getConfigBuilder().getProfile().getTargetHigh();
if (low == high)
tempTargetView.setText("" + low);
tempTargetView.setText(Profile.toUnitsString(low, Profile.fromMgdlToUnits(low, units), units));
else
tempTargetView.setText(low + " - " + high);
tempTargetView.setText(Profile.toUnitsString(low, Profile.fromMgdlToUnits(low, units), units) + " - " + Profile.toUnitsString(high, Profile.fromMgdlToUnits(high, units), units));
tempTargetView.setVisibility(View.VISIBLE);
}
if (Config.NSCLIENT && tempTarget == null) {