aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Core
diff options
context:
space:
mode:
authorGravatar Greg Soltis <gsoltis@google.com>2018-04-25 13:45:21 -0700
committerGravatar GitHub <noreply@github.com>2018-04-25 13:45:21 -0700
commit0748f265a6c95e2692f27ad59235521cb45e175d (patch)
tree572f957f0b43de69ab41f94dceeda18cdfc88605 /Firestore/Source/Core
parentff32b59036f35512c64fcd75ae5cee8aca228929 (diff)
Identify limbo-only document updates (#1167)
* Filter out document updates from target association changes * Move remote-event-modifying methods onto remote event * Style * keep limbo docs in remote event * Implement identification of limbo document updates * Refactor a bit to handle removes as well * Drop newline * Handle synthesized limbo deletes * Response to feedback * Appease the style gods
Diffstat (limited to 'Firestore/Source/Core')
-rw-r--r--Firestore/Source/Core/FSTSyncEngine.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Firestore/Source/Core/FSTSyncEngine.mm b/Firestore/Source/Core/FSTSyncEngine.mm
index 8c2aeb2..ca15e64 100644
--- a/Firestore/Source/Core/FSTSyncEngine.mm
+++ b/Firestore/Source/Core/FSTSyncEngine.mm
@@ -349,9 +349,13 @@ static const FSTListenSequenceNumber kIrrelevantSequenceNumber = -1;
[NSMutableDictionary dictionary];
FSTDeletedDocument *doc =
[FSTDeletedDocument documentWithKey:limboKey version:[FSTSnapshotVersion noVersion]];
+ FSTDocumentKeySet *limboDocuments = [[FSTDocumentKeySet keySet] setByAddingObject:doc.key];
FSTRemoteEvent *event = [[FSTRemoteEvent alloc] initWithSnapshotVersion:SnapshotVersion::None()
targetChanges:targetChanges
- documentUpdates:{{limboKey, doc}}];
+ documentUpdates:{
+ { limboKey, doc }
+ }
+ limboDocuments:limboDocuments];
[self applyRemoteEvent:event];
} else {
FSTQueryView *queryView = self.queryViewsByTarget[@(targetID)];