From 6ace7080b26aaf5a8c2476928060c09c8f3cf710 Mon Sep 17 00:00:00 2001 From: Roumen Georgiev Date: Thu, 5 Apr 2018 09:58:55 +0300 Subject: [PATCH] changed isOlderThan() parameter to hours not days --- .../java/info/nightscout/androidaps/db/CareportalEvent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java b/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java index 7302475a4e..b0f69144c5 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java +++ b/app/src/main/java/info/nightscout/androidaps/db/CareportalEvent.java @@ -98,9 +98,9 @@ public class CareportalEvent implements DataPointWithLabelInterface { return diff.get(TimeUnit.DAYS) + " " + MainApp.sResources.getString(R.string.days) + " " + diff.get(TimeUnit.HOURS) + " " + MainApp.sResources.getString(R.string.hours); } - public boolean isOlderThan(double days) { + public boolean isOlderThan(double hours) { Map diff = computeDiff(date, System.currentTimeMillis()); - if(diff.get(TimeUnit.DAYS) > days) + if(diff.get(TimeUnit.DAYS)*24 + diff.get(TimeUnit.HOURS) > hours) return true; else return false;