File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1365,14 +1365,15 @@ extension LoopDataManager {
1365
1365
let retrospectiveStart = glucose. date. addingTimeInterval ( - type( of: retrospectiveCorrection) . retrospectionInterval)
1366
1366
let earliestEffectDate = Date ( timeInterval: . hours( - 24 ) , since: now ( ) )
1367
1367
let nextEffectDate = insulinCounteractionEffects. last? . endDate ?? earliestEffectDate
1368
+ let insulinEffectStartDate = nextEffectDate. addingTimeInterval ( . minutes( - 5 ) )
1368
1369
1369
1370
let updateGroup = DispatchGroup ( )
1370
1371
let effectCalculationError = Locked < Error ? > ( nil )
1371
1372
1372
1373
var insulinEffect : [ GlucoseEffect ] ?
1373
1374
let basalDosingEnd = includingPendingInsulin ? nil : now ( )
1374
1375
updateGroup. enter ( )
1375
- doseStore. getGlucoseEffects ( start: nextEffectDate , end: nil , basalDosingEnd: basalDosingEnd) { result in
1376
+ doseStore. getGlucoseEffects ( start: insulinEffectStartDate , end: nil , basalDosingEnd: basalDosingEnd) { result in
1376
1377
switch result {
1377
1378
case . failure( let error) :
1378
1379
effectCalculationError. mutate { $0 = error }
You can’t perform that action at this time.
0 commit comments