Deal with 0.0 if AMA is used

This commit is contained in:
Tim Gunn 2020-05-21 02:20:38 +12:00
parent 77a5af75e2
commit 723c029228
No known key found for this signature in database
GPG key ID: C9BC1E9D0D0AED8C

View file

@ -657,8 +657,8 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
} else {
//If the target is not the same as set in the profile then oref has overridden it
//show this change to the user if it exists
if (lastRun != null){
var targetused = lastRun!!.constraintsProcessed!!.targetBG
var targetused = lastRun?.constraintsProcessed?.targetBG
if (targetused != null && targetused != 0.0) {
if (units == Constants.MMOL)
targetused *= Constants.MGDL_TO_MMOLL