From 3a905e9145bc0eed391695380a8ac0e5d0e91f45 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Fri, 12 Apr 2019 11:29:56 -0500 Subject: [PATCH 1/3] Adopt updates to DeviceManager protocol --- .../xcschemes/ShareClient.xcscheme | 2 +- .../xcschemes/ShareClientUI.xcscheme | 2 +- ShareClient/ShareClientManager.swift | 24 +++++++++++++++++-- .../ShareClientSettingsViewController.swift | 7 ++++-- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/ShareClient.xcodeproj/xcshareddata/xcschemes/ShareClient.xcscheme b/ShareClient.xcodeproj/xcshareddata/xcschemes/ShareClient.xcscheme index 13e3884..58e16e6 100644 --- a/ShareClient.xcodeproj/xcshareddata/xcschemes/ShareClient.xcscheme +++ b/ShareClient.xcodeproj/xcshareddata/xcschemes/ShareClient.xcscheme @@ -1,6 +1,6 @@ Date? in + return delegate?.startDateToFilterNewData(for: self)?.addingTimeInterval(TimeInterval(minutes: 1)) + } let newGlucose = glucose.filterDateRange(startDate, nil) let newSamples = newGlucose.filter({ $0.isStateValid }).map { return NewGlucoseSample(date: $0.startDate, quantity: $0.quantity, isDisplayOnly: false, syncIdentifier: "\(Int($0.startDate.timeIntervalSince1970))", device: self.device) diff --git a/ShareClientUI/ShareClientSettingsViewController.swift b/ShareClientUI/ShareClientSettingsViewController.swift index b137785..cbcf60b 100644 --- a/ShareClientUI/ShareClientSettingsViewController.swift +++ b/ShareClientUI/ShareClientSettingsViewController.swift @@ -180,8 +180,11 @@ public class ShareClientSettingsViewController: UITableViewController { tableView.deselectRow(at: indexPath, animated: true) case .delete: let confirmVC = UIAlertController(cgmDeletionHandler: { - self.cgmManager.cgmManagerDelegate?.cgmManagerWantsDeletion(self.cgmManager) - self.complete() + self.cgmManager.notifyDelegateOfDeletion { + DispatchQueue.main.async { + self.complete() + } + } }) present(confirmVC, animated: true) { From 11b85e402cd1101dff30443a48d77925db849916 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Thu, 18 Apr 2019 13:58:58 -0500 Subject: [PATCH 2/3] CGMManagerDelegateWrapper -> WeakSynchronizedDelegate --- ShareClient/ShareClientManager.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShareClient/ShareClientManager.swift b/ShareClient/ShareClientManager.swift index 6350f28..8d9d6f9 100644 --- a/ShareClient/ShareClientManager.swift +++ b/ShareClient/ShareClientManager.swift @@ -54,7 +54,7 @@ public class ShareClientManager: CGMManager { } } - public let delegate = CGMManagerDelegateWrapper() + public let delegate = WeakSynchronizedDelegate() public let providesBLEHeartbeat = false From dda1e9a2f3f02b75f48c1b004e0fbc1951d441a3 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Sun, 5 May 2019 13:54:06 -0500 Subject: [PATCH 3/3] Bump loopkit rev --- Cartfile.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cartfile.resolved b/Cartfile.resolved index 8653667..0284044 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1 @@ -github "LoopKit/LoopKit" "fff218d34b0d6818a70541c6df5b584968897e53" +github "LoopKit/LoopKit" "7333408f054e269669c91146b0f29bffbdcc150a"