File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1134,12 +1134,12 @@ extension DanaKitPumpManager: PumpManager {
11341134 ) )
11351135 }
11361136
1137- if state . tempBasalEndsAt > Date . now {
1137+ if let units = state . tempBasalUnits {
11381138 // Report cancelled temp basal
11391139 events. append ( NewPumpEvent . tempBasal (
11401140 dose: DoseEntry . tempBasal (
1141- absoluteUnit: unitsPerHour ,
1142- duration: duration ,
1141+ absoluteUnit: units ,
1142+ duration: 0 , // Ignored
11431143 insulinType: state. insulinType,
11441144 startDate: state. basalDeliveryDate,
11451145 endDate: Date . now
@@ -1150,8 +1150,8 @@ extension DanaKitPumpManager: PumpManager {
11501150
11511151 state. basalDeliveryOrdinal = isTempBasal ? . tempBasal : . active
11521152 state. basalDeliveryDate = startDate
1153- state. tempBasalUnits = unitsPerHour
1154- state. tempBasalDuration = duration
1153+ state. tempBasalUnits = isTempBasal ? unitsPerHour : nil
1154+ state. tempBasalDuration = isTempBasal ? duration : nil
11551155 state. lastStatusDate = Date . now
11561156 notifyStateDidChange ( )
11571157
You can’t perform that action at this time.
0 commit comments