Skip to content

Commit f90d2fd

Browse files
authored
[LOOP-3122] Dimmed device lifecycle progress (#377)
* using lifecycle progress state dimmed to color bar * using lifecycle progress state dimmed to color bar
1 parent 14c8e23 commit f90d2fd

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

LoopUI/Extensions/DeviceLifecycleProgressState.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,25 @@
77
//
88

99
import LoopKit
10+
import SwiftUI
1011

1112
extension DeviceLifecycleProgressState {
1213
public var color: UIColor {
1314
switch self {
15+
case .critical:
16+
return .critical
17+
case .dimmed:
18+
if #available(iOS 14.0, *) {
19+
return UIColor(Color.secondary)
20+
} else {
21+
return .systemGray
22+
}
1423
case .normalCGM:
1524
return .glucose
1625
case .normalPump:
1726
return .insulin
1827
case .warning:
1928
return .warning
20-
case .critical:
21-
return .critical
2229
}
2330
}
2431
}

0 commit comments

Comments
 (0)