mjthornton
04/15/2020, 8:15 PMShawn
04/15/2020, 8:16 PMminDistance from?mjthornton
04/15/2020, 8:17 PMmjthornton
04/15/2020, 8:18 PMmjthornton
04/15/2020, 8:19 PMmjthornton
04/15/2020, 8:20 PMShawn
04/15/2020, 8:20 PMminDistancemjthornton
04/15/2020, 8:21 PMmjthornton
04/15/2020, 8:22 PMShawn
04/15/2020, 8:31 PMmjthornton
04/15/2020, 8:33 PMShawn
04/15/2020, 8:34 PMShawn
04/15/2020, 8:35 PM.let if you canmjthornton
04/15/2020, 8:35 PMShawn
04/15/2020, 8:35 PMcontinue - ing early in the loopmjthornton
04/15/2020, 8:35 PMShawn
04/15/2020, 8:36 PMval dataSet = lineData.getDataSetByLabel("BG", true) ?: returnBob Glamm
04/15/2020, 8:36 PMif (minDistance == null || (minDistance != null && calcDistFromBolus < minDistance)) {
minDistance = calcDistFromBolus
closestEntry = bolusStartEndEntries[0].data as BolusDisplayModel
}mjthornton
04/15/2020, 8:56 PMmjthornton
04/15/2020, 8:56 PMmjthornton
04/15/2020, 8:57 PMJiri Bruchanov
04/15/2020, 8:58 PMInt.MIN_VALUE
instead of null ?Shawn
04/15/2020, 8:58 PMShawn
04/15/2020, 8:59 PMcalcDistFromBolus < minDistance always falseShawn
04/15/2020, 8:59 PMmin_value anyhow, you could use max instead maybe)Jiri Bruchanov
04/15/2020, 9:03 PMmjthornton
04/15/2020, 9:03 PMmjthornton
04/15/2020, 9:03 PMJiri Bruchanov
04/15/2020, 9:03 PMmjthornton
04/15/2020, 9:04 PMRoger Home-Martinsen
04/15/2020, 9:43 PMRoger Home-Martinsen
04/15/2020, 9:46 PM