From 0bb52acfe02037655831aaac74811b4aee8b2a2e Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 21 May 2021 17:24:33 +0200 Subject: [PATCH] fix therapy event rendering --- .../general/overview/graphExtensions/TherapyEventDataPoint.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphExtensions/TherapyEventDataPoint.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphExtensions/TherapyEventDataPoint.kt index d273f4e7f2..0467839741 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphExtensions/TherapyEventDataPoint.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphExtensions/TherapyEventDataPoint.kt @@ -31,11 +31,11 @@ class TherapyEventDataPoint @Inject constructor( if (data.glucose != null && data.glucose != 0.0) { var mmol = 0.0 var mgdl = 0.0 - if (units == GlucoseUnit.MGDL) { + if (data.glucoseUnit == TherapyEvent.GlucoseUnit.MGDL) { mgdl = data.glucose!! mmol = data.glucose!! * Constants.MGDL_TO_MMOLL } - if (units == GlucoseUnit.MMOL) { + if (data.glucoseUnit == TherapyEvent.GlucoseUnit.MMOL) { mmol = data.glucose!! mgdl = data.glucose!! * Constants.MMOLL_TO_MGDL }