From 3f02c8fc8c39fd958c7f765a8042931749793eaf Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Sun, 6 Nov 2016 02:01:22 +0100 Subject: [PATCH] Show decimal place The time since last bolus has one decimal place but it was shown as zero. --- .../info/nightscout/androidaps/plugins/DanaR/DanaRFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRFragment.java index 6e4dbcf982..3595193ce1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/DanaRFragment.java @@ -202,7 +202,7 @@ public class DanaRFragment extends Fragment implements FragmentBase { } if (DanaRPlugin.getDanaRPump().lastBolusTime.getTime() != 0) { Long agoMsec = new Date().getTime() - DanaRPlugin.getDanaRPump().lastBolusTime.getTime(); - double agoHours = (int) (agoMsec / 60d / 60d / 1000d); + double agoHours = agoMsec / 60d / 60d / 1000d; if (agoHours < 6) // max 6h back lastBolusView.setText(formatTime.format(DanaRPlugin.getDanaRPump().lastBolusTime) + " (" + DecimalFormatter.to1Decimal(agoHours) + " " + getString(R.string.hoursago) + ") " + DecimalFormatter.to2Decimal(danaRPlugin.getDanaRPump().lastBolusAmount) + " U"); else lastBolusView.setText("");