diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index d3ba854..3a87b72 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -482,6 +482,11 @@ final class RemoteStore: ObservableObject { func onForeground() { endBackgroundHold() guard !demoMode, isPaired else { return } + // Pretend we're still connected for a few seconds while the (possibly OS-killed) sockets + // re-handshake — the reconnect below is fast, and flashing "Disconnected" in the meantime + // just feels janky. Set before `reconnect()` so the connecting/reconnecting states it + // produces are overlaid with the last-live projection (see `rebuildAggregate`). + beginOptimisticWindow() // Foreground again: the app self-creates its own Live Activity now, so tell the hosts to stop // push-to-starting it (UX_IOS §5.3). Sent to already-live hosts; ones still reconnecting get // it via `didUpdate` once live.