Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions G7SensorKitUI/G7CGMManager/G7CGMManager+UI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ extension G7CGMManager: CGMManagerUI {
public var cgmLifecycleProgress: DeviceLifecycleProgress? {
switch lifecycleState {
case .ok:
// show remaining lifetime, if < 24 hours
// show remaining lifetime, if < 48 hours
guard let expiration = sensorExpiresAt else {
return nil
}
let remaining = max(0, expiration.timeIntervalSinceNow)

if remaining < .hours(24) {
if remaining < .hours(48) {
return G7LifecycleProgress(percentComplete: 1-(remaining/lifetime), progressState: .warning)
}
return nil
Expand Down