Skip to content

Commit

Permalink
Merge pull request #320 from bjornoleh/eventualBG_decimals
Browse files Browse the repository at this point in the history
Eventual BG with 1 decimal in the app and in the watch app
  • Loading branch information
Sjoerd-Bo3 authored Jul 2, 2024
2 parents 0d12d15 + 20ba334 commit a364b62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion FreeAPS/Sources/Modules/Home/View/HomeRootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
)!
)
Expand Down
2 changes: 1 addition & 1 deletion FreeAPS/Sources/Services/WatchManager/WatchManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit a364b62

Please sign in to comment.