Skip to content

Commit bca8785

Browse files
author
Brian Chen
authored
Move addSnapshotsInSyncListener to public (#3968)
1 parent 09f3f6c commit bca8785

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Firestore/Source/API/FIRFirestore.mm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,14 @@ - (void)terminateWithCompletion:(nullable void (^)(NSError *_Nullable error))com
309309
[self terminateInternalWithCompletion:completion];
310310
}
311311

312+
- (id<FIRListenerRegistration>)addSnapshotsInSyncListener:(void (^)(void))listener {
313+
std::unique_ptr<core::EventListener<Empty>> eventListener =
314+
core::EventListener<Empty>::Create([listener](const StatusOr<Empty> &v) { listener(); });
315+
std::unique_ptr<ListenerRegistration> result =
316+
_firestore->AddSnapshotsInSyncListener(std::move(eventListener));
317+
return [[FSTListenerRegistration alloc] initWithRegistration:std::move(result)];
318+
}
319+
312320
@end
313321

314322
@implementation FIRFirestore (Internal)
@@ -337,14 +345,6 @@ - (void)terminateInternalWithCompletion:(nullable void (^)(NSError *_Nullable er
337345
_firestore->Terminate(util::MakeCallback(completion));
338346
}
339347

340-
- (id<FIRListenerRegistration>)addSnapshotsInSyncListener:(void (^)(void))listener {
341-
std::unique_ptr<core::EventListener<Empty>> eventListener =
342-
core::EventListener<Empty>::Create([listener](const StatusOr<Empty> &v) { listener(); });
343-
std::unique_ptr<ListenerRegistration> result =
344-
_firestore->AddSnapshotsInSyncListener(std::move(eventListener));
345-
return [[FSTListenerRegistration alloc] initWithRegistration:std::move(result)];
346-
}
347-
348348
@end
349349

350350
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)