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 {
13651365 let retrospectiveStart = glucose. date. addingTimeInterval ( - type( of: retrospectiveCorrection) . retrospectionInterval)
13661366 let earliestEffectDate = Date ( timeInterval: . hours( - 24 ) , since: now ( ) )
13671367 let nextEffectDate = insulinCounteractionEffects. last? . endDate ?? earliestEffectDate
1368+ let insulinEffectStartDate = nextEffectDate. addingTimeInterval ( . minutes( - 5 ) )
13681369
13691370 let updateGroup = DispatchGroup ( )
13701371 let effectCalculationError = Locked < Error ? > ( nil )
13711372
13721373 var insulinEffect : [ GlucoseEffect ] ?
13731374 let basalDosingEnd = includingPendingInsulin ? nil : now ( )
13741375 updateGroup. enter ( )
1375- doseStore. getGlucoseEffects ( start: nextEffectDate , end: nil , basalDosingEnd: basalDosingEnd) { result in
1376+ doseStore. getGlucoseEffects ( start: insulinEffectStartDate , end: nil , basalDosingEnd: basalDosingEnd) { result in
13761377 switch result {
13771378 case . failure( let error) :
13781379 effectCalculationError. mutate { $0 = error }
You can’t perform that action at this time.
0 commit comments