diff --git a/LoopFollow/Controllers/Nightscout/Treatments/Overrides.swift b/LoopFollow/Controllers/Nightscout/Treatments/Overrides.swift index 0730fc41a..6bd3e2488 100644 --- a/LoopFollow/Controllers/Nightscout/Treatments/Overrides.swift +++ b/LoopFollow/Controllers/Nightscout/Treatments/Overrides.swift @@ -21,7 +21,10 @@ extension MainViewController { } let now = Date().timeIntervalSince1970 - let maxEndDate = now + Storage.shared.predictionToLoad.value * 3600 + let minimumFutureDisplayHours = 0.25 + let effectiveFutureHours = max(Storage.shared.predictionToLoad.value, minimumFutureDisplayHours) + let maxEndDate = now + effectiveFutureHours * 3600 + let graphHorizon = dateTimeUtils.getTimeIntervalNHoursAgo(N: 24 * Storage.shared.downloadDays.value) for i in 0 ..< sorted.count {