Launch Activity Logic
Nucleic-Session: EBB24271-3AB2-4CBD-A47A-59FC73500371 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -1284,7 +1284,9 @@ final class RemoteStore: ObservableObject {
|
|||||||
// A host that dropped should re-register when it returns.
|
// A host that dropped should re-register when it returns.
|
||||||
pushToStartSentTo = pushToStartSentTo.filter { connections[$0]?.connectivity.isLive == true }
|
pushToStartSentTo = pushToStartSentTo.filter { connections[$0]?.connectivity.isLive == true }
|
||||||
for (id, conn) in connections {
|
for (id, conn) in connections {
|
||||||
guard conn.connectivity.isLive, conn.capabilities.canPushLiveActivity,
|
// Gate on the dedicated push-to-start bit, not `canPushLiveActivity`: an older host can
|
||||||
|
// advertise the latter yet throw on the unknown `registerPushToStartToken` tag.
|
||||||
|
guard conn.connectivity.isLive, conn.capabilities.canPushToStartLiveActivity,
|
||||||
!pushToStartSentTo.contains(id) else { continue }
|
!pushToStartSentTo.contains(id) else { continue }
|
||||||
conn.send(.registerPushToStartToken(token))
|
conn.send(.registerPushToStartToken(token))
|
||||||
pushToStartSentTo.insert(id)
|
pushToStartSentTo.insert(id)
|
||||||
|
|||||||
Reference in New Issue
Block a user