diff options
Diffstat (limited to 'Firestore/Source/Core')
-rw-r--r-- | Firestore/Source/Core/FSTEventManager.h | 2 | ||||
-rw-r--r-- | Firestore/Source/Core/FSTEventManager.m | 8 | ||||
-rw-r--r-- | Firestore/Source/Core/FSTFirestoreClient.m | 6 | ||||
-rw-r--r-- | Firestore/Source/Core/FSTSyncEngine.h | 2 | ||||
-rw-r--r-- | Firestore/Source/Core/FSTSyncEngine.m | 4 | ||||
-rw-r--r-- | Firestore/Source/Core/FSTView.h | 2 | ||||
-rw-r--r-- | Firestore/Source/Core/FSTView.m | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/Firestore/Source/Core/FSTEventManager.h b/Firestore/Source/Core/FSTEventManager.h index edd2a96..8eafd4b 100644 --- a/Firestore/Source/Core/FSTEventManager.h +++ b/Firestore/Source/Core/FSTEventManager.h @@ -62,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)queryDidChangeViewSnapshot:(FSTViewSnapshot *)snapshot; - (void)queryDidError:(NSError *)error; -- (void)clientDidChangeOnlineState:(FSTOnlineState)onlineState; +- (void)applyChangedOnlineState:(FSTOnlineState)onlineState; @property(nonatomic, strong, readonly) FSTQuery *query; diff --git a/Firestore/Source/Core/FSTEventManager.m b/Firestore/Source/Core/FSTEventManager.m index 3e1b99b..bc204a0 100644 --- a/Firestore/Source/Core/FSTEventManager.m +++ b/Firestore/Source/Core/FSTEventManager.m @@ -151,7 +151,7 @@ NS_ASSUME_NONNULL_BEGIN self.viewSnapshotHandler(nil, error); } -- (void)clientDidChangeOnlineState:(FSTOnlineState)onlineState { +- (void)applyChangedOnlineState:(FSTOnlineState)onlineState { self.onlineState = onlineState; if (self.snapshot && !self.raisedInitialEvent && [self shouldRaiseInitialEventForSnapshot:self.snapshot onlineState:onlineState]) { @@ -268,7 +268,7 @@ NS_ASSUME_NONNULL_BEGIN } [queryInfo.listeners addObject:listener]; - [listener clientDidChangeOnlineState:self.onlineState]; + [listener applyChangedOnlineState:self.onlineState]; if (queryInfo.viewSnapshot) { [listener queryDidChangeViewSnapshot:queryInfo.viewSnapshot]; @@ -321,11 +321,11 @@ NS_ASSUME_NONNULL_BEGIN [self.queries removeObjectForKey:query]; } -- (void)watchStreamDidChangeOnlineState:(FSTOnlineState)onlineState { +- (void)applyChangedOnlineState:(FSTOnlineState)onlineState { self.onlineState = onlineState; for (FSTQueryListenersInfo *info in self.queries.objectEnumerator) { for (FSTQueryListener *listener in info.listeners) { - [listener clientDidChangeOnlineState:onlineState]; + [listener applyChangedOnlineState:onlineState]; } } } diff --git a/Firestore/Source/Core/FSTFirestoreClient.m b/Firestore/Source/Core/FSTFirestoreClient.m index d8bdde7..fff644d 100644 --- a/Firestore/Source/Core/FSTFirestoreClient.m +++ b/Firestore/Source/Core/FSTFirestoreClient.m @@ -187,9 +187,9 @@ NS_ASSUME_NONNULL_BEGIN [self.syncEngine userDidChange:user]; } -- (void)watchStreamDidChangeOnlineState:(FSTOnlineState)onlineState { - [self.syncEngine applyOnlineStateChange:onlineState]; - [self.eventManager watchStreamDidChangeOnlineState:onlineState]; +- (void)applyChangedOnlineState:(FSTOnlineState)onlineState { + [self.syncEngine applyChangedOnlineState:onlineState]; + [self.eventManager applyChangedOnlineState:onlineState]; } - (void)disableNetworkWithCompletion:(nullable FSTVoidErrorBlock)completion { diff --git a/Firestore/Source/Core/FSTSyncEngine.h b/Firestore/Source/Core/FSTSyncEngine.h index 316ac05..7060155 100644 --- a/Firestore/Source/Core/FSTSyncEngine.h +++ b/Firestore/Source/Core/FSTSyncEngine.h @@ -101,7 +101,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)userDidChange:(FSTUser *)user; /** Applies an FSTOnlineState change to the sync engine and notifies any views of the change. */ -- (void)applyOnlineStateChange:(FSTOnlineState)onlineState; +- (void)applyChangedOnlineState:(FSTOnlineState)onlineState; @end diff --git a/Firestore/Source/Core/FSTSyncEngine.m b/Firestore/Source/Core/FSTSyncEngine.m index aa1ccae..27ab73e 100644 --- a/Firestore/Source/Core/FSTSyncEngine.m +++ b/Firestore/Source/Core/FSTSyncEngine.m @@ -318,11 +318,11 @@ NS_ASSUME_NONNULL_BEGIN [self emitNewSnapshotsWithChanges:changes remoteEvent:remoteEvent]; } -- (void)applyOnlineStateChange:(FSTOnlineState)onlineState { +- (void)applyChangedOnlineState:(FSTOnlineState)onlineState { NSMutableArray<FSTViewSnapshot *> *newViewSnapshots = [NSMutableArray array]; [self.queryViewsByQuery enumerateKeysAndObjectsUsingBlock:^(FSTQuery *query, FSTQueryView *queryView, BOOL *stop) { - FSTViewChange *viewChange = [queryView.view applyOnlineStateChange:onlineState]; + FSTViewChange *viewChange = [queryView.view applyChangedOnlineState:onlineState]; FSTAssert(viewChange.limboChanges.count == 0, @"OnlineState should not affect limbo documents."); if (viewChange.snapshot) { diff --git a/Firestore/Source/Core/FSTView.h b/Firestore/Source/Core/FSTView.h index beadf46..6ff77cd 100644 --- a/Firestore/Source/Core/FSTView.h +++ b/Firestore/Source/Core/FSTView.h @@ -143,7 +143,7 @@ typedef NS_ENUM(NSInteger, FSTLimboDocumentChangeType) { * Applies an FSTOnlineState change to the view, potentially generating an FSTViewChange if the * view's syncState changes as a result. */ -- (FSTViewChange *)applyOnlineStateChange:(FSTOnlineState)onlineState; +- (FSTViewChange *)applyChangedOnlineState:(FSTOnlineState)onlineState; @end diff --git a/Firestore/Source/Core/FSTView.m b/Firestore/Source/Core/FSTView.m index df41f4c..78019c6 100644 --- a/Firestore/Source/Core/FSTView.m +++ b/Firestore/Source/Core/FSTView.m @@ -336,7 +336,7 @@ static NSComparisonResult FSTCompareDocumentViewChangeTypes(FSTDocumentViewChang } } -- (FSTViewChange *)applyOnlineStateChange:(FSTOnlineState)onlineState { +- (FSTViewChange *)applyChangedOnlineState:(FSTOnlineState)onlineState { if (self.isCurrent && onlineState == FSTOnlineStateFailed) { // If we're offline, set `current` to NO and then call applyChanges to refresh our syncState // and generate an FSTViewChange as appropriate. We are guaranteed to get a new FSTTargetChange |