aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Core/FSTSyncEngine.mm
diff options
context:
space:
mode:
authorGravatar zxu <zxu@google.com>2018-03-24 11:06:32 -0400
committerGravatar GitHub <noreply@github.com>2018-03-24 11:06:32 -0400
commitb3050e42d842a4aef122efd277481c46bfa88dff (patch)
treed18994e8d1c85d726ca3007f86ade676e70242b6 /Firestore/Source/Core/FSTSyncEngine.mm
parent38170347b9f71798602f652e20404b565d4bd049 (diff)
port C++ `DocumentKey` to `Remote/*` (#965)
* port C++ DocumentKey to Remote's * port C++ DocumentKey to Remote's * address changes * address changes * address changes
Diffstat (limited to 'Firestore/Source/Core/FSTSyncEngine.mm')
-rw-r--r--Firestore/Source/Core/FSTSyncEngine.mm6
1 files changed, 2 insertions, 4 deletions
diff --git a/Firestore/Source/Core/FSTSyncEngine.mm b/Firestore/Source/Core/FSTSyncEngine.mm
index d567878..b1f138a 100644
--- a/Firestore/Source/Core/FSTSyncEngine.mm
+++ b/Firestore/Source/Core/FSTSyncEngine.mm
@@ -300,7 +300,7 @@ static const FSTListenSequenceNumber kIrrelevantSequenceNumber = -1;
FSTTargetChange *_Nonnull targetChange, BOOL *_Nonnull stop) {
FSTDocumentKey *limboKey = self.limboKeysByTarget[targetID];
if (limboKey && targetChange.currentStatusUpdate == FSTCurrentStatusUpdateMarkCurrent &&
- remoteEvent.documentUpdates[limboKey] == nil) {
+ remoteEvent.documentUpdates.find(limboKey) == remoteEvent.documentUpdates.end()) {
// When listening to a query the server responds with a snapshot containing documents
// matching the query and a current marker telling us we're now in sync. It's possible for
// these to arrive as separate remote events or as a single remote event. For a document
@@ -363,11 +363,9 @@ static const FSTListenSequenceNumber kIrrelevantSequenceNumber = -1;
[NSMutableDictionary dictionary];
FSTDeletedDocument *doc =
[FSTDeletedDocument documentWithKey:limboKey version:[FSTSnapshotVersion noVersion]];
- NSMutableDictionary<FSTDocumentKey *, FSTMaybeDocument *> *docUpdate =
- [NSMutableDictionary dictionaryWithObject:doc forKey:limboKey];
FSTRemoteEvent *event = [FSTRemoteEvent eventWithSnapshotVersion:[FSTSnapshotVersion noVersion]
targetChanges:targetChanges
- documentUpdates:docUpdate];
+ documentUpdates:{{limboKey, doc}}];
[self applyRemoteEvent:event];
} else {
FSTQueryView *queryView = self.queryViewsByTarget[targetID];