From 0f2a620ebe2773712c88b5640c2f058c1ac4e064 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 10 Sep 2018 12:41:57 +0200 Subject: [PATCH] fix NewInsulinDialog message --- .../androidaps/plugins/Overview/Dialogs/NewInsulinDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewInsulinDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewInsulinDialog.java index 1fad80af8f..6040680aaf 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewInsulinDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewInsulinDialog.java @@ -218,13 +218,13 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener List actions = new LinkedList<>(); if (insulin > 0) { - actions.add(MainApp.gs(R.string.bolus) + ": " + "" + insulinAfterConstraints + "U" + ""); + actions.add(MainApp.gs(R.string.bolus) + ": " + "" + DecimalFormatter.to2Decimal(insulinAfterConstraints) + "U" + ""); if (recordOnlyCheckbox.isChecked()) { actions.add("" + MainApp.gs(R.string.bolusrecordedonly) + ""); } } - if (!insulinAfterConstraints.equals(insulin)) + if (Math.abs(insulinAfterConstraints - insulin) > 0.01d) actions.add("" + MainApp.gs(R.string.bolusconstraintapplied) + ""); int eatingSoonTTDuration = SP.getInt(R.string.key_eatingsoon_duration, Constants.defaultEatingSoonTTDuration);