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

fix(watchmanager): correctly colouring in watchchart for mmol

Signed-off-by: Sjoerd Bozon <sjoerd.bozon@gmail.com>
Sjoerd Bozon 1 год назад
Родитель
Сommit
acd72f14f3
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      Trio/Sources/Services/WatchManager/AppleWatchManager.swift

+ 3 - 3
Trio/Sources/Services/WatchManager/AppleWatchManager.swift

@@ -217,9 +217,9 @@ final class BaseWatchManager: NSObject, WCSessionDelegate, Injectable, WatchMana
 
 
             let highGlucoseValue = isDynamicColorScheme ? hardCodedHigh : self.highGlucose
             let highGlucoseValue = isDynamicColorScheme ? hardCodedHigh : self.highGlucose
             let lowGlucoseValue = isDynamicColorScheme ? hardCodedLow : self.lowGlucose
             let lowGlucoseValue = isDynamicColorScheme ? hardCodedLow : self.lowGlucose
-            let highGlucoseColorValue = self.units == .mgdL ? highGlucoseValue : highGlucoseValue.asMmolL
-            let lowGlucoseColorValue = self.units == .mgdL ? lowGlucoseValue : lowGlucoseValue.asMmolL
-            let targetGlucose = self.units == .mgdL ? self.currentGlucoseTarget : self.currentGlucoseTarget.asMmolL
+            let highGlucoseColorValue = highGlucoseValue
+            let lowGlucoseColorValue = lowGlucoseValue
+            let targetGlucose = self.currentGlucoseTarget
 
 
             let currentGlucoseColor = Trio.getDynamicGlucoseColor(
             let currentGlucoseColor = Trio.getDynamicGlucoseColor(
                 glucoseValue: Decimal(latestGlucose.glucose),
                 glucoseValue: Decimal(latestGlucose.glucose),