Skip to content
Merged
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
10 changes: 10 additions & 0 deletions Loop/View Controllers/SettingsTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,16 @@ final class SettingsTableViewController: UITableViewController {
case .basalRate:
guard let pumpManager = dataManager.pumpManager else {
// Not allowing basal schedule entry without a configured pump.
let alert = UIAlertController(
title: NSLocalizedString("Unconfigured Pump", comment: "Alert title for unconfigured pump"),
message: NSLocalizedString("Please configure a pump to view or edit scheduled basal rates.", comment: "Alert message for attempting to change basal rates before pump was configured."),
preferredStyle: .alert
)

let acknowledgeChange = UIAlertAction(title: NSLocalizedString("OK", comment: "Button text to dismiss unconfigured pump alert."), style: .default) { _ in }
alert.addAction(acknowledgeChange)

present(alert, animated: true)
tableView.deselectRow(at: indexPath, animated: true)
return
}
Expand Down