Parcourir la source

Merge pull request #320 from bjornoleh/eventualBG_decimals

Eventual BG with 1 decimal in the app and in the watch app
Sjoerd Bozon il y a 1 an
Parent
commit
a364b62c7d

+ 1 - 1
FreeAPS/Sources/Modules/Home/View/HomeRootView.swift

@@ -344,7 +344,7 @@ extension Home {
 
                     if let eventualBG = state.eventualBG {
                         Text(
-                            "⇢ " + numberFormatter.string(
+                            "⇢ " + targetFormatter.string(
                                 from: (state.units == .mmolL ? eventualBG.asMmolL : Decimal(eventualBG)) as NSNumber
                             )!
                         )

+ 1 - 1
FreeAPS/Sources/Services/WatchManager/WatchManager.swift

@@ -216,7 +216,7 @@ final class BaseWatchManager: NSObject, WatchManager, Injectable {
     private var eventualFormatter: NumberFormatter {
         let formatter = NumberFormatter()
         formatter.numberStyle = .decimal
-        formatter.maximumFractionDigits = 2
+        formatter.maximumFractionDigits = 1
         return formatter
     }