From 23cd6279ec2047705ed5af8ab7109fa9cc1e0b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cas=20Eli=C3=ABns?= Date: Mon, 22 Jul 2019 08:42:34 +0200 Subject: [PATCH] Hide unit suffix for SMBs issued by AndroidAPS --- lib/client/renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client/renderer.js b/lib/client/renderer.js index 5b1c36ad83b..e39b590cab5 100644 --- a/lib/client/renderer.js +++ b/lib/client/renderer.js @@ -455,7 +455,7 @@ function init (client, d3) { var unit_of_measurement = ' U'; // One international unit of insulin (1 IU) is shown as '1 U' var enteredBy = '' + treatment.enteredBy; - if (treatment.insulin < 1 && !treatment.carbs && enteredBy.indexOf('openaps') > -1) { // don't show the unit of measurement for insulin boluses < 1 without carbs (e.g. oref0 SMB's). Otherwise lot's of small insulin only dosages are often unreadable + if ((treatment.insulin < 1 && !treatment.carbs && enteredBy.indexOf('openaps') > -1) || treatment.isSMB) { // don't show the unit of measurement for insulin boluses < 1 without carbs (e.g. oref0 SMB's). Otherwise lot's of small insulin only dosages are often unreadable unit_of_measurement = ''; // remove leading zeros to avoid overlap with adjacent boluses dosage_units = (dosage_units + "").replace(/^0/, "");