diff --git a/FreeAPS/Sources/Modules/Home/View/HomeRootView.swift b/FreeAPS/Sources/Modules/Home/View/HomeRootView.swift index 87a2503ada..a4469955bb 100644 --- a/FreeAPS/Sources/Modules/Home/View/HomeRootView.swift +++ b/FreeAPS/Sources/Modules/Home/View/HomeRootView.swift @@ -32,6 +32,13 @@ extension Home { return formatter } + private var eventualBGFormatter: NumberFormatter { + let formatter = NumberFormatter() + formatter.numberStyle = .decimal + formatter.maximumFractionDigits = 1 + return formatter + } + private var targetFormatter: NumberFormatter { let formatter = NumberFormatter() formatter.numberStyle = .decimal @@ -532,7 +539,7 @@ extension Home { if let eventualBG = state.eventualBG { Text( - "⇢ " + numberFormatter.string( + "⇢ " + eventualBGFormatter.string( from: (state.units == .mmolL ? eventualBG.asMmolL : Decimal(eventualBG)) as NSNumber )! )