diff --git a/LoopUI/Views/GlucoseHUDView.swift b/LoopUI/Views/GlucoseHUDView.swift index 6b287282cc..e2b242719c 100644 --- a/LoopUI/Views/GlucoseHUDView.swift +++ b/LoopUI/Views/GlucoseHUDView.swift @@ -93,15 +93,21 @@ public final class GlucoseHUDView: BaseHUDView { let time = timeFormatter.string(from: glucoseStartDate) caption?.text = time + let sensorDataCurrent = glucoseStartDate.timeIntervalSinceNow > TimeInterval(minutes: -15) + let numberFormatter = NumberFormatter.glucoseFormatter(for: unit) if let valueString = numberFormatter.string(from: glucoseQuantity) { - glucoseLabel.text = valueString + if sensorDataCurrent { + glucoseLabel.text = valueString + } else { + glucoseLabel.text = "-" + } accessibilityStrings.append(String(format: NSLocalizedString("%1$@ at %2$@", comment: "Accessbility format value describing glucose: (1: glucose number)(2: glucose time)"), valueString, time)) } var unitStrings = [unit.localizedShortUnitString] - if let trend = sensor?.trendType { + if let trend = sensor?.trendType, sensorDataCurrent { unitStrings.append(trend.symbol) accessibilityStrings.append(trend.localizedDescription) }