Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various Omnipod Active Time display improvements #673

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions OmniKitUI/ViewControllers/OmnipodSettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class OmnipodSettingsViewController: RileyLinkSettingsViewController {
}

fileprivate enum StatusRow: Int, CaseIterable {
case activatedAt = 0
case activeTime = 0
case expiresAt
case bolus
case basal
Expand Down Expand Up @@ -459,9 +459,9 @@ class OmnipodSettingsViewController: RileyLinkSettingsViewController {
let cell = tableView.dequeueReusableCell(withIdentifier: SettingsTableViewCell.className, for: indexPath)

switch statusRow {
case .activatedAt:
case .activeTime:
let cell = tableView.dequeueReusableCell(withIdentifier: SettingsTableViewCell.className, for: indexPath)
cell.textLabel?.text = LocalizedString("Active Time", comment: "The title of the cell showing the pod activated at time")
cell.textLabel?.text = LocalizedString("Active Time", comment: "The title of the cell showing the pod active time")
cell.setDetailAge(podState.activatedAt?.timeIntervalSinceNow)
return cell
case .expiresAt:
Expand Down Expand Up @@ -784,7 +784,7 @@ extension OmnipodSettingsViewController: PodStateObserver {
return
}

let reloadRows: [StatusRow] = [.bolus, .basal, .reservoirLevel, .deliveredInsulin]
let reloadRows: [StatusRow] = [.activeTime, .bolus, .basal, .reservoirLevel, .deliveredInsulin]
self.tableView.reloadRows(at: reloadRows.map({ IndexPath(row: $0.rawValue, section: statusIdx) }), with: .none)

if oldState?.activeAlerts != state?.activeAlerts,
Expand Down