File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -298,10 +298,15 @@ final class StatusTableViewController: LoopChartsTableViewController {
298
298
didSet {
299
299
if oldValue != bolusState {
300
300
switch bolusState {
301
- case . inProgress( _ ) :
301
+ case . inProgress( let dose ) :
302
302
guard case . inProgress = oldValue else {
303
303
// Bolus starting
304
304
bolusProgressReporter = deviceManager. pumpManager? . createBolusProgressReporter ( reportingOn: DispatchQueue . main)
305
+ // If there is an existing bolus progressCell, update its dose values now in case the app is currently in the
306
+ // background as otherwise these values won't get initialized and can contain stale data from some earlier bolus.
307
+ if let progressCell = tableView. cellForRow ( at: IndexPath ( row: StatusRow . status. rawValue, section: Section . status. rawValue) ) as? BolusProgressTableViewCell {
308
+ progressCell. configuration = . bolusing( delivered: 0 , ofTotalVolume: dose. programmedUnits)
309
+ }
305
310
break
306
311
}
307
312
default :
You can’t perform that action at this time.
0 commit comments