Skip to content

Commit 86e184e

Browse files
committed
chore: ios implementation
1 parent c2a32d7 commit 86e184e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

packages/firestore/ios/RNFBFirestore/RNFBFirestoreModule.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
NSMutableDictionary *emulatorConfigs;
2525
static __strong NSMutableDictionary *snapshotsInSyncListeners;
26-
static NSString *const RNFB_FIRESTORE_DOCUMENTS_IN_SYNC = @"firestore_snapshots_in_sync_event";
26+
static NSString *const RNFB_FIRESTORE_SNAPSHOTS_IN_SYNC = @"firestore_snapshots_in_sync_event";
2727

2828
@implementation RNFBFirestoreModule
2929
#pragma mark -
@@ -242,7 +242,7 @@ + (BOOL)requiresMainQueueSetup {
242242
resolve(nil);
243243
}
244244

245-
RCT_EXPORT_METHOD(addSnapshotsInSyncListener
245+
RCT_EXPORT_METHOD(addSnapshotsInSync
246246
: (FIRApp *)firebaseApp
247247
: (NSString *)databaseId
248248
: (nonnull NSNumber *)listenerId
@@ -251,10 +251,10 @@ + (BOOL)requiresMainQueueSetup {
251251
NSString *appName = [RNFBSharedUtils getAppJavaScriptName:firApp.name];
252252
NSString *firestoreKey = [RNFBFirestoreCommon createFirestoreKeyWithAppName:appName
253253
databaseId:databaseId];
254-
NSDictionary *serialized = [RNFBFirestoreSerialize documentSnapshotToDictionary:snapshot
255-
firestoreKey:firestoreKey];
256-
[[RNFBRCTEventEmitter shared]
257-
sendEventWithName:RNFB_FIRESTORE_DOCUMENTS_IN_SYNC
254+
FIRAddSnapshotsInSync *addSnapshotsInSync =
255+
[RNFBFirestoreCommon getFirestoreForApp:firebaseApp databaseId:databaseId].addSnapshotsInSync
256+
[[RNFBRCTEventEmitter shared]]
257+
sendEventWithName:RNFB_FIRESTORE_SNAPSHOTS_IN_SYNC
258258
body:@{
259259
@"appName" : [RNFBSharedUtils getAppJavaScriptName:firApp.name],
260260
@"databaseId" : databaseId,

0 commit comments

Comments
 (0)