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

Just one decimal in delta BG now

Jon Mårtensson 5 лет назад
Родитель
Сommit
470c43e228
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      FreeAPS/Sources/Modules/Home/View/Header/CurrentGlucoseView.swift

+ 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)) }
         }
     }