Przeglądaj źródła

fix: double lastGlucose convertion

Bastiaan Verhaar 4 miesięcy temu
rodzic
commit
ceafe12575

+ 1 - 1
Trio/Sources/Modules/Home/View/Header/CurrentGlucoseView.swift

@@ -141,7 +141,7 @@ struct CurrentGlucoseView: View {
         var secondLastGlucose = Decimal(glucose.first?.glucose ?? 0)
         if units == .mmolL {
             lastGlucose = lastGlucose.asMmolL
-            secondLastGlucose = lastGlucose.asMmolL
+            secondLastGlucose = secondLastGlucose.asMmolL
         }
         let delta = lastGlucose - secondLastGlucose
         return deltaFormatter.string(from: delta as NSNumber) ?? "--"