From 743350f4b3b9fd2a0fc0d34eb42bca32febcb3ff Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sat, 11 Jun 2016 23:34:18 +0200 Subject: [PATCH] another glucose status fix --- .../main/java/info/nightscout/androidaps/db/DatabaseHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java index ac50d3c1f6..e21d040991 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java +++ b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java @@ -184,7 +184,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper { int sizeRecords = bgReadings.size(); - if (sizeRecords < 4 || bgReadings.get(sizeRecords - 1).timestamp > new Date().getTime() - 7 * 60 * 1000l) + if (sizeRecords < 4 || bgReadings.get(sizeRecords - 4).timestamp < new Date().getTime() - 7 * 60 * 1000l) return null; int minutes = 5;