Foreground Connection Delay Adjustment
Nucleic-Session: CB658C4F-A19F-447C-B313-7CB21783BD94 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -482,6 +482,11 @@ final class RemoteStore: ObservableObject {
|
|||||||
func onForeground() {
|
func onForeground() {
|
||||||
endBackgroundHold()
|
endBackgroundHold()
|
||||||
guard !demoMode, isPaired else { return }
|
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
|
// 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
|
// push-to-starting it (UX_IOS §5.3). Sent to already-live hosts; ones still reconnecting get
|
||||||
// it via `didUpdate` once live.
|
// it via `didUpdate` once live.
|
||||||
|
|||||||
Reference in New Issue
Block a user