From c71150d5ab1ea9665de77a20ad444d9d019fdc61 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Mon, 6 Jul 2026 12:54:02 -0700 Subject: [PATCH] Adjust Push Notification Logic Nucleic-Session: 0F065CD6-20FE-4941-ACF5-C57A4572A5A3 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Models/RemoteStore.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index 2cda3d5..297536e 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -773,6 +773,17 @@ final class RemoteStore: ObservableObject { /// Activity summary. `sessions`/`liveSessions` are already the merged aggregate. private func refreshAggregate() { NotificationRouter.shared.updateBadge(needsYouCount) + // When no session is blocked on an approval anymore, recall the "waiting for your approval" + // wake tickle a prior push may have left on the lock screen. Complements the relay's silent + // clear (which covers phones that were away): this catches the phone that saw the tickle and + // then connected, so the resolution arrives as a broadcast rather than a push. Idempotent — + // a no-op when the tickle isn't there. Per-approval locals are withdrawn as each resolves. + let approvalsPending = liveSessions.contains { + $0.pendingApprovalCount > 0 || $0.status == .awaitingApproval + } + if !approvalsPending { + NotificationRouter.shared.withdrawApprovalAttention() + } LiveActivityManager.shared.sync(hostName: hostName, sessions: liveSessions) }