fix displaying delta when not available

This commit is contained in:
Milos Kozak 2017-02-21 10:00:08 +01:00
parent 2465ed2985
commit 34ed92f8aa
2 changed files with 4 additions and 0 deletions

View file

@ -720,6 +720,9 @@ public class OverviewFragment extends Fragment {
deltaView.setText("Δ " + NSProfile.toUnitsString(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units) + " " + units);
avgdeltaView.setText("øΔ15m: " + NSProfile.toUnitsString(glucoseStatus.short_avgdelta, glucoseStatus.short_avgdelta * Constants.MGDL_TO_MMOLL, units) +
" øΔ40m: " + NSProfile.toUnitsString(glucoseStatus.long_avgdelta, glucoseStatus.long_avgdelta * Constants.MGDL_TO_MMOLL, units));
} else {
deltaView.setText(MainApp.sResources.getString(R.string.notavailable));
avgdeltaView.setText("");
}
BgReading.units = profile.getUnits();

View file

@ -541,4 +541,5 @@
<string name="wear_detailedIOB_title">Show detailed IOB</string>
<string name="wear_detailedIOB_summary">Break down IOB into bolus and basal IOB on the watchface</string>
<string name="nosuccess">not successful - please check phone</string>
<string name="notavailable">Not available</string>
</resources>