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) }