Skip to content

Commit

Permalink
[LOOP-4877] block UI updates for certaint bolus transitions (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhamming authored Jun 27, 2024
1 parent 19b6d0a commit df5215f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Loop/View Controllers/StatusTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -772,16 +772,23 @@ final class StatusTableViewController: LoopChartsTableViewController {
switch (statusWasVisible, statusIsVisible) {
case (true, true):
switch (oldStatusRowMode, self.statusRowMode) {
case (.pumpSuspended(resuming: let wasResuming), .pumpSuspended(resuming: let isResuming)):
if isResuming != wasResuming {
tableView.reloadRows(at: [statusIndexPath], with: animated ? .fade : .none)
}
case (.enactingBolus, .enactingBolus):
break
case (.bolusing(let oldDose), .bolusing(let newDose)):
if oldDose.syncIdentifier != newDose.syncIdentifier {
tableView.reloadRows(at: [statusIndexPath], with: animated ? .fade : .none)
}
case (.pumpSuspended(resuming: let wasResuming), .pumpSuspended(resuming: let isResuming)):
if isResuming != wasResuming {
case (.canceledBolus(let oldDose), .canceledBolus(let newDose)):
if oldDose != newDose {
tableView.reloadRows(at: [statusIndexPath], with: animated ? .fade : .none)
}
case (.cancelingBolus, .cancelingBolus), (.cancelingBolus, .bolusing(_)), (.canceledBolus(_), .cancelingBolus), (.canceledBolus(_), .bolusing(_)):
// these updates cause flickering and/or confusion.
break
default:
tableView.reloadRows(at: [statusIndexPath], with: animated ? .fade : .none)
}
Expand Down

0 comments on commit df5215f

Please sign in to comment.