File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -1453,6 +1453,9 @@ extension MinimedPumpManager: PumpManager {
1453
1453
guard let session = session else {
1454
1454
throw PumpManagerError . connection ( MinimedPumpManagerError . noRileyLink)
1455
1455
}
1456
+ guard self . state. unfinalizedBolus == nil else {
1457
+ throw PumpManagerError . configuration ( MinimedPumpManagerError . bolusInProgress)
1458
+ }
1456
1459
try session. setTimeToNow ( in: . current)
1457
1460
completion ( nil )
1458
1461
} catch let error {
Original file line number Diff line number Diff line change @@ -67,6 +67,24 @@ extension MinimedPumpManager: PumpManagerUI {
67
67
}
68
68
}
69
69
70
+ public enum MinimedStatusBadge : DeviceStatusBadge {
71
+ case timeSyncNeeded
72
+
73
+ public var image : UIImage ? {
74
+ switch self {
75
+ case . timeSyncNeeded:
76
+ return UIImage ( systemName: " clock.fill " )
77
+ }
78
+ }
79
+
80
+ public var state : DeviceStatusBadgeState {
81
+ switch self {
82
+ case . timeSyncNeeded:
83
+ return . warning
84
+ }
85
+ }
86
+ }
87
+
70
88
// MARK: - PumpStatusIndicator
71
89
extension MinimedPumpManager {
72
90
@@ -79,6 +97,10 @@ extension MinimedPumpManager {
79
97
}
80
98
81
99
public var pumpStatusBadge : DeviceStatusBadge ? {
82
- return nil
100
+ if isClockOffset {
101
+ return MinimedStatusBadge . timeSyncNeeded
102
+ } else {
103
+ return nil
104
+ }
83
105
}
84
106
}
You can’t perform that action at this time.
0 commit comments