diff --git a/NucleicRemote/NucleicRemote/LiveActivityManager.swift b/NucleicRemote/NucleicRemote/LiveActivityManager.swift index 72dfa34..703b405 100644 --- a/NucleicRemote/NucleicRemote/LiveActivityManager.swift +++ b/NucleicRemote/NucleicRemote/LiveActivityManager.swift @@ -34,7 +34,14 @@ final class LiveActivityManager { /// itself carries an `AlertConfiguration` (sound/haptic). Starts `true` — `onAppear` runs /// foreground; the background adopt path flips it. Mirrors the host's connected-vs-away gate for /// the pushed glance, but for the still-connected phone whose own socket is alive. - var foreground = true + var foreground = true { + didSet { + // The app just came forward and the user can now see the in-app session list — so dismiss + // the "Done" glance we were holding on the lock screen for exactly this moment. The + // counterpart to `finishWithDoneGlance` keeping it up while the app was away. + if foreground, !oldValue, showingDoneGlance { end() } + } + } /// The last content we pushed. Updates that don't change it are skipped so we don't spend /// ActivityKit's update budget on no-ops — `sync` fires on every host message (dashboard,