From 42ea226adbe6b7908ce3fe8d709f65278eb9b6d0 Mon Sep 17 00:00:00 2001 From: Paul Plant Date: Sun, 30 Jul 2023 21:38:10 +0200 Subject: [PATCH] correction to mmol/L BGReadingView formatting --- xdrip/SwiftUIViews/BgReadingsDetailView.swift | 2 +- xdrip/SwiftUIViews/BgReadingsView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xdrip/SwiftUIViews/BgReadingsDetailView.swift b/xdrip/SwiftUIViews/BgReadingsDetailView.swift index e1212c8d3..ec869ea8b 100644 --- a/xdrip/SwiftUIViews/BgReadingsDetailView.swift +++ b/xdrip/SwiftUIViews/BgReadingsDetailView.swift @@ -30,7 +30,7 @@ struct BgReadingsDetailView: View { row(title: Texts_BgReadings.timestamp, data: bgReading.timeStamp.toStringInUserLocale(timeStyle: .long, dateStyle: .long)) - row(title: Texts_BgReadings.calculatedValue, data: bgReading.calculatedValue.mgdlToMmol(mgdl: isMgDl).bgValueRounded(mgdl: isMgDl).stringWithoutTrailingZeroes + " " + String(isMgDl ? Texts_Common.mgdl : Texts_Common.mmol)) + row(title: Texts_BgReadings.calculatedValue, data: bgReading.calculatedValue.mgdlToMmol(mgdl: isMgDl).bgValueRounded(mgdl: isMgDl).bgValuetoString(mgdl: isMgDl) + " " + String(isMgDl ? Texts_Common.mgdl : Texts_Common.mmol)) row(title: Texts_BgReadings.slopeArrow, data: bgReading.slopeArrow()) diff --git a/xdrip/SwiftUIViews/BgReadingsView.swift b/xdrip/SwiftUIViews/BgReadingsView.swift index 2ff3de3f2..233a81cfd 100644 --- a/xdrip/SwiftUIViews/BgReadingsView.swift +++ b/xdrip/SwiftUIViews/BgReadingsView.swift @@ -89,7 +89,7 @@ struct BgReadingsView: View { visualIndicator(bgRangeDescription: bgReading.bgRangeDescription()) .font(.system(size: 10)) - Text(bgReading.calculatedValue.mgdlToMmol(mgdl: isMgDl).bgValueRounded(mgdl: isMgDl).stringWithoutTrailingZeroes) + Text(bgReading.calculatedValue.mgdlToMmol(mgdl: isMgDl).bgValueRounded(mgdl: isMgDl).bgValuetoString(mgdl: isMgDl)) .foregroundColor(.primary) Text(String(isMgDl ? Texts_Common.mgdl : Texts_Common.mmol))