Kaynağa Gözat

Cleanup unused function

and a couple extraneous comments
Mike Plante 1 yıl önce
ebeveyn
işleme
24afd7cfeb

+ 0 - 6
Trio/Sources/APS/APSManager.swift

@@ -24,7 +24,6 @@ protocol APSManager {
     func determineBasalSync() async throws
     func simulateDetermineBasal(simulatedCarbsAmount: Decimal, simulatedBolusAmount: Decimal) async -> Determination?
     func roundBolus(amount: Decimal) -> Decimal
-    func roundBolusNoCap(amount: Decimal) -> Decimal
     var lastError: CurrentValueSubject<Error?, Never> { get }
     func cancelBolus(_ callback: ((Bool, String) -> Void)?) async
 }
@@ -498,11 +497,6 @@ final class BaseAPSManager: APSManager, Injectable {
         return min(rounded, maxBolus)
     }
 
-    func roundBolusNoCap(amount: Decimal) -> Decimal {
-        guard let pump = pumpManager else { return amount }
-        return Decimal(pump.roundToSupportedBolusVolume(units: Double(amount)))
-    }
-
     private var bolusReporter: DoseProgressReporter?
 
     func enactBolus(amount: Double, isSMB: Bool, callback: ((Bool, String) -> Void)?) async {

+ 0 - 2
Trio/Sources/Modules/Treatments/View/PopupView.swift

@@ -243,7 +243,6 @@ struct PopupView: View {
             Text(maxCobReached ? "Max COB:" : "COB:")
                 .foregroundColor(maxCobReached ? Color.loopRed : .secondary)
 
-            // Middle column
             Text(
                 state.wholeCob
                     .formatted(.number.grouping(.never).rounded().precision(.fractionLength(fractionDigits)))
@@ -255,7 +254,6 @@ struct PopupView: View {
             .foregroundColor(.secondary)
             .gridColumnAlignment(.leading)
 
-            // Right column
             HStack {
                 Text(self.insulinFormatter(state.wholeCobInsulin))
                 Text("U").foregroundColor(.secondary)