fix NewInsulinDialog message

This commit is contained in:
Milos Kozak 2018-09-10 12:41:57 +02:00
parent 6f53afbbe3
commit 0f2a620ebe

View file

@ -218,13 +218,13 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener
List<String> actions = new LinkedList<>(); List<String> actions = new LinkedList<>();
if (insulin > 0) { if (insulin > 0) {
actions.add(MainApp.gs(R.string.bolus) + ": " + "<font color='" + MainApp.gc(R.color.bolus) + "'>" + insulinAfterConstraints + "U" + "</font>"); actions.add(MainApp.gs(R.string.bolus) + ": " + "<font color='" + MainApp.gc(R.color.bolus) + "'>" + DecimalFormatter.to2Decimal(insulinAfterConstraints) + "U" + "</font>");
if (recordOnlyCheckbox.isChecked()) { if (recordOnlyCheckbox.isChecked()) {
actions.add("<font color='" + MainApp.gc(R.color.warning) + "'>" + MainApp.gs(R.string.bolusrecordedonly) + "</font>"); actions.add("<font color='" + MainApp.gc(R.color.warning) + "'>" + MainApp.gs(R.string.bolusrecordedonly) + "</font>");
} }
} }
if (!insulinAfterConstraints.equals(insulin)) if (Math.abs(insulinAfterConstraints - insulin) > 0.01d)
actions.add("<font color='" + MainApp.gc(R.color.warning) + "'>" + MainApp.gs(R.string.bolusconstraintapplied) + "</font>"); actions.add("<font color='" + MainApp.gc(R.color.warning) + "'>" + MainApp.gs(R.string.bolusconstraintapplied) + "</font>");
int eatingSoonTTDuration = SP.getInt(R.string.key_eatingsoon_duration, Constants.defaultEatingSoonTTDuration); int eatingSoonTTDuration = SP.getInt(R.string.key_eatingsoon_duration, Constants.defaultEatingSoonTTDuration);