소스 검색

Merge pull request #320 from bjornoleh/eventualBG_decimals

Eventual BG with 1 decimal in the app and in the watch app
Sjoerd Bozon 1 년 전
부모
커밋
a364b62c7d
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      FreeAPS/Sources/Modules/Home/View/HomeRootView.swift
  2. 1 1
      FreeAPS/Sources/Services/WatchManager/WatchManager.swift

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