From 5c9baa31f3056893edd5580ce6b022005ce24865 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sat, 13 Oct 2018 14:27:09 +0200 Subject: [PATCH] fix different colors BG vs target range --- .../java/info/nightscout/androidaps/db/BgReading.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/db/BgReading.java b/app/src/main/java/info/nightscout/androidaps/db/BgReading.java index a2e06d0bb1..3b5963b83b 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/BgReading.java +++ b/app/src/main/java/info/nightscout/androidaps/db/BgReading.java @@ -220,14 +220,8 @@ public class BgReading implements DataPointWithLabelInterface { @Override public int getColor() { String units = ProfileFunctions.getInstance().getProfileUnits(); - Double lowLine = SP.getDouble("low_mark", 0d); - Double highLine = SP.getDouble("high_mark", 0d); - if (lowLine < 1) { - lowLine = Profile.fromMgdlToUnits(OverviewPlugin.bgTargetLow, units); - } - if (highLine < 1) { - highLine = Profile.fromMgdlToUnits(OverviewPlugin.bgTargetHigh, units); - } + Double lowLine = OverviewPlugin.getPlugin().determineLowLine(units); + Double highLine = OverviewPlugin.getPlugin().determineHighLine(units); int color = MainApp.gc(R.color.inrange); if (isPrediction()) return getPredectionColor();