|
|
@@ -438,6 +438,16 @@ extension GlucoseAlertCoordinator: SnoozeObserver {
|
|
|
/// IDs so the post-snooze evaluation can re-fire fresh if any condition
|
|
|
/// still breaches.
|
|
|
func snoozeDidChange(_ untilDate: Date) {
|
|
|
+ // Mirror the global snooze onto per-alarm snoozedUntil: alarms with
|
|
|
+ // "Override Silence & DnD" are issued .critical and pierce the
|
|
|
+ // AlertMuter, so the shared mute window alone can't hold them. A
|
|
|
+ // shorter per-type snooze (e.g. a 15-min swipe) would otherwise
|
|
|
+ // resurface them mid-window. Urgent low keeps its 15-minute safety
|
|
|
+ // floor and is never bulk-snoozed. An ended snooze (.distantPast)
|
|
|
+ // clears the stamps the same way.
|
|
|
+ for type in GlucoseAlertType.allCases where type != .urgentLow {
|
|
|
+ snoozeGlucoseType(type, until: untilDate)
|
|
|
+ }
|
|
|
guard untilDate > Date() else { return }
|
|
|
evaluationQueue.async { [weak self] in
|
|
|
self?.firingAlertIDs.removeAll()
|