File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 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 {
298298 didSet {
299299 if oldValue != bolusState {
300300 switch bolusState {
301- case . inProgress( _ ) :
301+ case . inProgress( let dose ) :
302302 guard case . inProgress = oldValue else {
303303 // Bolus starting
304304 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+ }
305310 break
306311 }
307312 default :
You can’t perform that action at this time.
0 commit comments