From 890399e486e99363f68fa7c700ff2405cdea9fb8 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Mon, 6 Jul 2026 21:34:09 -0700 Subject: [PATCH] Push Notification Live Activity Redundancy Nucleic-Session: 73687ED9-C11C-438C-832B-979332B73893 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Models/RemoteStore.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index 1327198..ff40b49 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -1530,7 +1530,11 @@ final class RemoteStore: ObservableObject { /// so they know whether to defer to the phone's own Live Activity creation (foreground) or /// push-to-start the glance themselves (backgrounded — the phone can't reliably start one). Starts /// `true`: `onAppear` runs in the foreground; the background adopt-wake flips it first (§5.3). - private var isForeground = true + /// Mirrored to `LiveActivityManager` so it knows whether a "needs you" arrival should alert + /// through the glance (backgrounded) or stay silent while a banner announces it (foreground). + private var isForeground = true { + didSet { LiveActivityManager.shared.foreground = isForeground } + } /// Host ids already told the *current* `isForeground` value — cleared whenever it flips so the /// next sync re-notifies every host (mirrors `pushToStartSentTo`). private var foregroundSentTo: Set = []