Просмотр исходного кода

Remove commented out code; adjust debug log for cgmManager update

Deniz Cengiz 1 год назад
Родитель
Сommit
f044cab416

+ 3 - 2
Trio/Sources/APS/CGM/PluginSource.swift

@@ -159,8 +159,9 @@ extension PluginSource: CGMManagerDelegate {
         UUID().uuidString
     }
 
-    func cgmManager(_: CGMManager, didUpdate status: CGMManagerStatus) {
-        debug(.deviceManager, "DEBUG DID UPDATE STATE")
+    func cgmManager(_ cgmManager: CGMManager, didUpdate status: CGMManagerStatus) {
+        debug(.deviceManager, "CGM Manager did update state to \(status)")
+        
         processQueue.async {
             if self.cgmHasValidSensorSession != status.hasValidSensorSession {
                 self.cgmHasValidSensorSession = status.hasValidSensorSession

+ 0 - 5
Trio/Sources/APS/FetchGlucoseManager.swift

@@ -126,11 +126,6 @@ final class BaseFetchGlucoseManager: FetchGlucoseManager, Injectable {
         // if plugin, if not the same pluginID, need to reset the cgmManager
         // if plugin and newManager provides, update cgmManager
         debug(.apsManager, "plugin : \(String(describing: cgmManager?.pluginIdentifier))")
-//        if let manager = newManager
-//        {
-//            cgmManager = manager
-//            glucoseSource = nil
-//            removeCalibrations()
 
         if let manager = newManager {
             // If the pointer to manager is the *same* as our current `cgmManager`, skip re-init

+ 0 - 9
Trio/Sources/Modules/CGMSettings/CGMSettingsStateModel.swift

@@ -145,15 +145,6 @@ extension CGMSettings {
                 }
             }
         }
-
-//        func deleteCGM() {
-//            shouldDisplayCGMSetupSheet = false
-//
-//            DispatchQueue.main.asyncAfter(deadline: .now() + 0.1, execute: {
-//                self.fetchGlucoseManager.deleteGlucoseSource()
-//                self.completionNotifyingDidComplete(OtherCGMSourceCompletionNotifying())
-//            })
-//        }
     }
 }
 

+ 0 - 9
Trio/Sources/Modules/Home/HomeStateModel.swift

@@ -466,15 +466,6 @@ extension Home {
             }
         }
 
-//        func deleteCGM() {
-//            shouldDisplayCGMSetupSheet = false
-//
-//            DispatchQueue.main.asyncAfter(deadline: .now() + 0.1, execute: {
-//                self.fetchGlucoseManager?.deleteGlucoseSource()
-//                self.completionNotifyingDidComplete(CGMDeletionCompletionNotifying())
-//            })
-//        }
-
         /// Display the eventual status message provided by the manager of the pump
         /// Only display if state is warning or critical message else return nil
         private func displayPumpStatusHighlightMessage(_ didDeactivate: Bool = false) {