From 089a81800f797dd9562482420cef227529d1d020 Mon Sep 17 00:00:00 2001 From: AQ Date: Tue, 31 Mar 2020 10:31:40 -0700 Subject: [PATCH 1/4] Add alert for unconfigured pump --- .../View Controllers/SettingsTableViewController.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Loop/View Controllers/SettingsTableViewController.swift b/Loop/View Controllers/SettingsTableViewController.swift index e806e7776b..de32dafa7f 100644 --- a/Loop/View Controllers/SettingsTableViewController.swift +++ b/Loop/View Controllers/SettingsTableViewController.swift @@ -522,6 +522,16 @@ final class SettingsTableViewController: UITableViewController { guard let pumpManager = dataManager.pumpManager else { // Not allowing basal schedule entry without a configured pump. tableView.deselectRow(at: indexPath, animated: true) + 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) return } let vc = BasalScheduleTableViewController(allowedBasalRates: pumpManager.supportedBasalRates, maximumScheduleItemCount: pumpManager.maximumBasalScheduleEntryCount, minimumTimeInterval: pumpManager.minimumBasalScheduleEntryDuration) From 364b9e4c31dd24d455f218b62ccccedc06c7bedb Mon Sep 17 00:00:00 2001 From: AQ Date: Tue, 31 Mar 2020 10:48:09 -0700 Subject: [PATCH 2/4] Fix ordering --- Loop/View Controllers/SettingsTableViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Loop/View Controllers/SettingsTableViewController.swift b/Loop/View Controllers/SettingsTableViewController.swift index de32dafa7f..d7b6c4bd4e 100644 --- a/Loop/View Controllers/SettingsTableViewController.swift +++ b/Loop/View Controllers/SettingsTableViewController.swift @@ -521,7 +521,6 @@ final class SettingsTableViewController: UITableViewController { case .basalRate: guard let pumpManager = dataManager.pumpManager else { // Not allowing basal schedule entry without a configured pump. - tableView.deselectRow(at: indexPath, animated: true) 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."), @@ -532,6 +531,7 @@ final class SettingsTableViewController: UITableViewController { alert.addAction(acknowledgeChange) present(alert, animated: true) + tableView.deselectRow(at: indexPath, animated: true) return } let vc = BasalScheduleTableViewController(allowedBasalRates: pumpManager.supportedBasalRates, maximumScheduleItemCount: pumpManager.maximumBasalScheduleEntryCount, minimumTimeInterval: pumpManager.minimumBasalScheduleEntryDuration) From 6e8117334866d2e626cd9e99f9ec2d2bb99551b4 Mon Sep 17 00:00:00 2001 From: AQ Date: Thu, 2 Apr 2020 15:36:07 -0700 Subject: [PATCH 3/4] Add description of sleep data usage by Loop --- Learn/Info.plist | 2 +- Loop/Info.plist | 2 +- Loop/en.lproj/InfoPlist.strings | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Learn/Info.plist b/Learn/Info.plist index cd88cba1d1..63ba51e0b7 100644 --- a/Learn/Info.plist +++ b/Learn/Info.plist @@ -25,7 +25,7 @@ LSRequiresIPhoneOS NSHealthShareUsageDescription - Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. + Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to improve the Apple Watch complication. UILaunchStoryboardName LaunchScreen UIMainStoryboardFile diff --git a/Loop/Info.plist b/Loop/Info.plist index f8907e07d0..a58f735ae5 100644 --- a/Loop/Info.plist +++ b/Loop/Info.plist @@ -50,7 +50,7 @@ NSFaceIDUsageDescription Face ID is used to authenticate insulin bolus. NSHealthShareUsageDescription - Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. + Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to improve the Apple Watch complication. NSHealthUpdateUsageDescription Carbohydrate meal data entered in the app and on the watch is stored in the Health database. Glucose data retrieved from the CGM is stored securely in HealthKit. NSUserActivityTypes diff --git a/Loop/en.lproj/InfoPlist.strings b/Loop/en.lproj/InfoPlist.strings index dd51a9cde8..5c4f9edb34 100644 --- a/Loop/en.lproj/InfoPlist.strings +++ b/Loop/en.lproj/InfoPlist.strings @@ -12,7 +12,7 @@ "NSFaceIDUsageDescription" = "Face ID is used to authenticate insulin bolus."; /* Privacy - Health Share Usage Description */ -"NSHealthShareUsageDescription" = "Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation."; +"NSHealthShareUsageDescription" = "Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to improve the Apple Watch complication."; /* Privacy - Health Update Usage Description */ "NSHealthUpdateUsageDescription" = "Carbohydrate meal data entered in the app and on the watch is stored in the Health database. Glucose data retrieved from the CGM is stored securely in HealthKit."; From b529bd9c1e7162a92cffed26e29159f3bfdfa726 Mon Sep 17 00:00:00 2001 From: AQ Date: Thu, 2 Apr 2020 19:27:51 -0700 Subject: [PATCH 4/4] Update wording --- Learn/Info.plist | 2 +- Loop/Info.plist | 2 +- Loop/en.lproj/InfoPlist.strings | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Learn/Info.plist b/Learn/Info.plist index 63ba51e0b7..df6adf9510 100644 --- a/Learn/Info.plist +++ b/Learn/Info.plist @@ -25,7 +25,7 @@ LSRequiresIPhoneOS NSHealthShareUsageDescription - Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to improve the Apple Watch complication. + Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to optimize delivery of Apple Watch complication updates during the time you are awake. UILaunchStoryboardName LaunchScreen UIMainStoryboardFile diff --git a/Loop/Info.plist b/Loop/Info.plist index a58f735ae5..d7bee421c3 100644 --- a/Loop/Info.plist +++ b/Loop/Info.plist @@ -50,7 +50,7 @@ NSFaceIDUsageDescription Face ID is used to authenticate insulin bolus. NSHealthShareUsageDescription - Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to improve the Apple Watch complication. + Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to optimize delivery of Apple Watch complication updates during the time you are awake. NSHealthUpdateUsageDescription Carbohydrate meal data entered in the app and on the watch is stored in the Health database. Glucose data retrieved from the CGM is stored securely in HealthKit. NSUserActivityTypes diff --git a/Loop/en.lproj/InfoPlist.strings b/Loop/en.lproj/InfoPlist.strings index 5c4f9edb34..3b377afb02 100644 --- a/Loop/en.lproj/InfoPlist.strings +++ b/Loop/en.lproj/InfoPlist.strings @@ -12,7 +12,7 @@ "NSFaceIDUsageDescription" = "Face ID is used to authenticate insulin bolus."; /* Privacy - Health Share Usage Description */ -"NSHealthShareUsageDescription" = "Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to improve the Apple Watch complication."; +"NSHealthShareUsageDescription" = "Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to optimize delivery of Apple Watch complication updates during the time you are awake."; /* Privacy - Health Update Usage Description */ "NSHealthUpdateUsageDescription" = "Carbohydrate meal data entered in the app and on the watch is stored in the Health database. Glucose data retrieved from the CGM is stored securely in HealthKit.";