From 618042812b3059dcdb50759bdf95cae08593a428 Mon Sep 17 00:00:00 2001 From: EYHN Date: Fri, 21 Feb 2025 11:11:10 +0800 Subject: [PATCH] fix(nbstore): fix cloud awareness (#10320) --- .../nbstore/src/impls/cloud/awareness.ts | 32 +++++++++---------- packages/frontend/apps/ios/App/Podfile.lock | 24 +++++++------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/packages/common/nbstore/src/impls/cloud/awareness.ts b/packages/common/nbstore/src/impls/cloud/awareness.ts index 2523c60992..472bf095f4 100644 --- a/packages/common/nbstore/src/impls/cloud/awareness.ts +++ b/packages/common/nbstore/src/impls/cloud/awareness.ts @@ -78,22 +78,6 @@ export class CloudAwarenessStorage extends AwarenessStorageBase { }); }; - if (this.connection.status === 'connected') { - joinAndCollect().catch(err => - console.error('awareness join failed', err) - ); - } - - const unsubscribeConnectionStatusChanged = this.connection.onStatusChanged( - status => { - if (status === 'connected') { - joinAndCollect().catch(err => - console.error('awareness join failed', err) - ); - } - } - ); - const handleCollectAwareness = ({ spaceId, spaceType, @@ -146,6 +130,22 @@ export class CloudAwarenessStorage extends AwarenessStorageBase { } }; + if (this.connection.status === 'connected') { + joinAndCollect().catch(err => + console.error('awareness join failed', err) + ); + } + + const unsubscribeConnectionStatusChanged = this.connection.onStatusChanged( + status => { + if (status === 'connected') { + joinAndCollect().catch(err => + console.error('awareness join failed', err) + ); + } + } + ); + return () => { leave(); diff --git a/packages/frontend/apps/ios/App/Podfile.lock b/packages/frontend/apps/ios/App/Podfile.lock index 934d930c0e..e599c26d77 100644 --- a/packages/frontend/apps/ios/App/Podfile.lock +++ b/packages/frontend/apps/ios/App/Podfile.lock @@ -1,14 +1,14 @@ PODS: - - Capacitor (6.2.0): + - Capacitor (7.0.1): - CapacitorCordova - - CapacitorApp (6.0.2): + - CapacitorApp (7.0.0): - Capacitor - - CapacitorBrowser (6.0.4): + - CapacitorBrowser (7.0.0): - Capacitor - - CapacitorCordova (6.2.0) - - CapacitorHaptics (6.0.2): + - CapacitorCordova (7.0.1) + - CapacitorHaptics (7.0.0): - Capacitor - - CapacitorKeyboard (6.0.3): + - CapacitorKeyboard (7.0.0): - Capacitor - CryptoSwift (1.8.3) @@ -40,12 +40,12 @@ EXTERNAL SOURCES: :path: "../../../../../node_modules/@capacitor/keyboard" SPEC CHECKSUMS: - Capacitor: 1f3c7b9802d958cd8c4eb63895fff85dff2e1eea - CapacitorApp: 2a8c3a0b0814322e5e6e15fe595f02c3808f0f8b - CapacitorBrowser: ef0529d16cd8839281050c350e7bbee4f5c6d65f - CapacitorCordova: b33e7f4aa4ed105dd43283acdd940964374a87d9 - CapacitorHaptics: b53409aaca1203f79c6d0eb3ed5de40556339518 - CapacitorKeyboard: 460c6f9ec5e52c84f2742d5ce2e67bbc7ab0ebb0 + Capacitor: 23fff43571a4d1e3ee7d67b5a3588c6e757c2913 + CapacitorApp: 45cb7cbef4aa380b9236fd6980033eb5cde6fcd2 + CapacitorBrowser: 352a66541b15ceadae1d703802b11979023705e3 + CapacitorCordova: 63d476958d5022d76f197031e8b7ea3519988c64 + CapacitorHaptics: 1fba3e460e7614349c6d5f868b1fccdc5c87b66d + CapacitorKeyboard: 2c26c6fccde35023c579fc37d4cae6326d5e6343 CryptoSwift: 967f37cea5a3294d9cce358f78861652155be483 PODFILE CHECKSUM: e0c0ccf027ea6d51e476f0baf9d44d97b9a90a4b