Ensure basal rate shown as a percentage if required according to user preferences.
This commit is contained in:
parent
b180569695
commit
176c5f46ff
1 changed files with 6 additions and 2 deletions
|
@ -639,10 +639,14 @@ public class WatchUpdaterService extends WearableListenerService implements
|
||||||
String basalStringResult;
|
String basalStringResult;
|
||||||
TemporaryBasal activeTemp = treatmentsInterface.getTempBasalFromHistory(System.currentTimeMillis());
|
TemporaryBasal activeTemp = treatmentsInterface.getTempBasalFromHistory(System.currentTimeMillis());
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
basalStringResult = activeTemp.toStringVeryShort();
|
basalStringResult = activeTemp.toStringShort();
|
||||||
|
} else {
|
||||||
|
if (SP.getBoolean(R.string.key_danar_visualizeextendedaspercentage, false)) {
|
||||||
|
basalStringResult = "100%";
|
||||||
} else {
|
} else {
|
||||||
basalStringResult = DecimalFormatter.to2Decimal(MainApp.getConfigBuilder().getProfile().getBasal()) + "U/h";
|
basalStringResult = DecimalFormatter.to2Decimal(MainApp.getConfigBuilder().getProfile().getBasal()) + "U/h";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return basalStringResult;
|
return basalStringResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue