Ensure basal rate shown as a percentage if required according to user preferences.

This commit is contained in:
Andrew Warrington 2017-12-21 09:50:16 +01:00
parent b180569695
commit 176c5f46ff

View file

@ -639,9 +639,13 @@ public class WatchUpdaterService extends WearableListenerService implements
String basalStringResult;
TemporaryBasal activeTemp = treatmentsInterface.getTempBasalFromHistory(System.currentTimeMillis());
if (activeTemp != null) {
basalStringResult = activeTemp.toStringVeryShort();
basalStringResult = activeTemp.toStringShort();
} else {
basalStringResult = DecimalFormatter.to2Decimal(MainApp.getConfigBuilder().getProfile().getBasal()) + "U/h";
if (SP.getBoolean(R.string.key_danar_visualizeextendedaspercentage, false)) {
basalStringResult = "100%";
} else {
basalStringResult = DecimalFormatter.to2Decimal(MainApp.getConfigBuilder().getProfile().getBasal()) + "U/h";
}
}
return basalStringResult;
}