Skip to content

Commit 0cf5999

Browse files
author
Brian Chen
authored
Update comment for addSnapshotsInSyncListener (#5660)
1 parent aa14b5c commit 0cf5999

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

Firestore/Source/Public/FIRFirestore.h

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -211,21 +211,17 @@ NS_SWIFT_NAME(Firestore)
211211
- (void)waitForPendingWritesWithCompletion:(void (^)(NSError *_Nullable error))completion;
212212

213213
/**
214-
* Attaches a listener for a snapshots-in-sync event. Server-generated
215-
* updates and local changes can affect multiple snapshot listeners.
216-
* The snapshots-in-sync event indicates that all listeners affected by
217-
* a given change have fired.
214+
* Attaches a listener for a snapshots-in-sync event. The snapshots-in-sync event indicates that all
215+
* listeners affected by a given change have fired, even if a single server-generated change affects
216+
* multiple listeners.
218217
*
219-
* NOTE: The snapshots-in-sync event only indicates that listeners are
220-
* in sync with each other, but does not relate to whether those
221-
* snapshots are in sync with the server. Use SnapshotMetadata in the
222-
* individual listeners to determine if a snapshot is from the cache or
223-
* the server.
218+
* NOTE: The snapshots-in-sync event only indicates that listeners are in sync with each other, but
219+
* does not relate to whether those snapshots are in sync with the server. Use SnapshotMetadata in
220+
* the individual listeners to determine if a snapshot is from the cache or the server.
224221
*
225-
* @param listener A callback to be called every time all snapshot
226-
* listeners are in sync with each other.
227-
* @return A FIRListenerRegistration object that can be used to remove the
228-
* listener.
222+
* @param listener A callback to be called every time all snapshot listeners are in sync with each
223+
* other.
224+
* @return A FIRListenerRegistration object that can be used to remove the listener.
229225
*/
230226
- (id<FIRListenerRegistration>)addSnapshotsInSyncListener:(void (^)(void))listener
231227
NS_SWIFT_NAME(addSnapshotsInSyncListener(_:));
@@ -235,20 +231,19 @@ NS_SWIFT_NAME(Firestore)
235231
/**
236232
* Terminates this `FIRFirestore` instance.
237233
*
238-
* After calling `terminate` only the `clearPersistence` method may be used. Any other method
239-
* will throw an error.
234+
* After calling `terminate` only the `clearPersistence` method may be used. Any other method will
235+
* throw an error.
240236
*
241-
* To restart after termination, simply create a new instance of FIRFirestore with
242-
* `firestore` or `firestoreForApp` methods.
237+
* To restart after termination, simply create a new instance of FIRFirestore with `firestore` or
238+
* `firestoreForApp` methods.
243239
*
244240
* Termination does not cancel any pending writes and any tasks that are awaiting a response from
245-
* the server will not be resolved. The next time you start this instance, it will resume
246-
* attempting to send these writes to the server.
241+
* the server will not be resolved. The next time you start this instance, it will resume attempting
242+
* to send these writes to the server.
247243
*
248-
* Note: Under normal circumstances, calling this method is not required. This
249-
* method is useful only when you want to force this instance to release all of its resources or
250-
* in combination with `clearPersistence` to ensure that all local state is destroyed
251-
* between test runs.
244+
* Note: Under normal circumstances, calling this method is not required. This method is useful only
245+
* when you want to force this instance to release all of its resources or in combination with
246+
* `clearPersistence` to ensure that all local state is destroyed between test runs.
252247
*
253248
* @param completion A block to execute once everything has been terminated.
254249
*/

0 commit comments

Comments
 (0)