Skip to content

Commit

Permalink
Hide unit suffix for SMBs issued by AndroidAPS (#4771)
Browse files Browse the repository at this point in the history
  • Loading branch information
cascer1 authored and sulkaharo committed Dec 14, 2019
1 parent 51781f7 commit 1d005f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,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/, "");
Expand Down

0 comments on commit 1d005f9

Please sign in to comment.