Live Activity Session Retention

Nucleic-Session: F2CCC9F2-A7BA-4A94-ADAA-5414F168045E
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-07 03:00:02 -07:00
co-authored by Nucleic
parent 040f2a5e46
commit 44116a20d1
@@ -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,