Procházet zdrojové kódy

fix(glucoseformatter): mmol values now always showed with 1 decimal

Signed-off-by: Sjoerd Bozon <sjoerd.bozon@gmail.com>
Sjoerd Bozon před 1 rokem
rodič
revize
80cdfdd2d2
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      FreeAPS/Sources/Helpers/Formatters.swift

+ 1 - 0
FreeAPS/Sources/Helpers/Formatters.swift

@@ -63,6 +63,7 @@ extension Formatter {
 
 
         switch units {
         switch units {
         case .mmolL:
         case .mmolL:
+            formatter.minimumFractionDigits = 1
             formatter.maximumFractionDigits = 1
             formatter.maximumFractionDigits = 1
         case .mgdL:
         case .mgdL:
             formatter.maximumFractionDigits = 0
             formatter.maximumFractionDigits = 0