|
@@ -681,21 +681,6 @@ extension BaseDeviceDataManager: AlertObserver {
|
|
|
let alertIssueDate = alert.issuedDate
|
|
let alertIssueDate = alert.issuedDate
|
|
|
|
|
|
|
|
processQueue.async {
|
|
processQueue.async {
|
|
|
- // if not alert in OmniPod/BLE, the acknowledgeAlert didn't do callbacks- Hack to manage this case
|
|
|
|
|
- if let omnipodBLE = self.pumpManager as? OmniBLEPumpManager {
|
|
|
|
|
- if omnipodBLE.state.activeAlerts.isEmpty {
|
|
|
|
|
- // force to ack alert in the alertStorage
|
|
|
|
|
- self.alertHistoryStorage.acknowledgeAlert(alertIssueDate, nil)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if let omniPod = self.pumpManager as? OmnipodPumpManager {
|
|
|
|
|
- if omniPod.state.activeAlerts.isEmpty {
|
|
|
|
|
- // force to ack alert in the alertStorage
|
|
|
|
|
- self.alertHistoryStorage.acknowledgeAlert(alertIssueDate, nil)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
self.pumpManager?.acknowledgeAlert(alertIdentifier: alert.alertIdentifier) { error in
|
|
self.pumpManager?.acknowledgeAlert(alertIdentifier: alert.alertIdentifier) { error in
|
|
|
if let error = error {
|
|
if let error = error {
|
|
|
self.alertHistoryStorage.acknowledgeAlert(alertIssueDate, error.localizedDescription)
|
|
self.alertHistoryStorage.acknowledgeAlert(alertIssueDate, error.localizedDescription)
|