diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index ff40b49..39b361d 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -698,8 +698,15 @@ final class RemoteStore: ObservableObject { !self.openApprovals.contains(where: { $0.id == req.id }) { self.openApprovals.append(req) } - // Post for any host; the router suppresses the banner if the user is on this session. - NotificationRouter.shared.postApproval(req, sessionTitle: title) + // Prefer the Live Activity: when backgrounded with a glance on screen, the glance itself + // carries the approval (its inline Allow/Deny) and alerts (sound/haptic) via the local + // update path — so don't also post a banner. In-app the glance isn't the surface (it + // doesn't show over the app that controls it), so the banner is; and if there's no glance + // at all (Live Activities off) the banner is the only surface, so keep it as the fallback. + // willPresent still suppresses the banner when the user is already on this session. + if isForeground || !LiveActivityManager.shared.hasLiveActivity { + NotificationRouter.shared.postApproval(req, sessionTitle: title) + } } cb.approvalResolved = { [weak self] resolved in guard let self else { return }