Sfoglia il codice sorgente

Just one decimal in delta BG now

Jon Mårtensson 5 anni fa
parent
commit
470c43e228

+ 2 - 4
FreeAPS/Sources/Modules/Home/View/Header/CurrentGlucoseView.swift

@@ -19,7 +19,7 @@ struct CurrentGlucoseView: View {
     private var deltaFormatter: NumberFormatter {
         let formatter = NumberFormatter()
         formatter.numberStyle = .decimal
-        formatter.maximumFractionDigits = 2
+        formatter.maximumFractionDigits = 1
         formatter.positivePrefix = "+"
         return formatter
     }
@@ -97,9 +97,7 @@ struct CurrentGlucoseView: View {
                         .map { deltaFormatter.string(from: Double(units == .mmolL ? $0.asMmolL : Decimal($0)) as NSNumber)!
                         } ??
                         "--"
-
-                ).font(.system(size: 12, weight: .bold))
-            }
+                ).font(.system(size: 12, weight: .bold)) }
         }
     }