iOS Live Activity Updates

Nucleic-Session: 665980BA-E8A5-4E84-9DF4-1757CF792353
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-06 12:40:19 -07:00
co-authored by Nucleic
parent 70842a2cef
commit e62c061491
@@ -88,6 +88,12 @@ final class LiveActivityManager {
if let existing = Activity<NucleicSessionAttributes>.activities.first {
activity = existing
observePushToken(existing)
// Dismiss any duplicates so only the adopted Activity renders. iOS stacks multiple
// Activities of one type in the Dynamic Island — an orphan (from a prior launch that
// was killed before `end()`) then shows *its* stale state in the collapsed pill while
// expanding reveals the fresh one, and `end()` on completion would leave it lingering
// on the last "needs attention" glance. Keep exactly one.
endStrays(keeping: existing.id)
enqueue(state)
} else {
// `pushType: .token` opts the activity into APNs updates — the Macs push new