File tree 1 file changed +4
-2
lines changed
firebase-firestore/src/main/java/com/google/firebase/firestore/local
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -558,8 +558,10 @@ public void releaseQuery(Query query) {
558
558
queryCache .updateQueryData (queryData );
559
559
}
560
560
561
- // We remove both locally edited documents and documents that are associated via the query
562
- // cache.
561
+ // References for documents sent via Watch are automatically removed when we delete a
562
+ // query's target data from the reference delegate. Since this does not remove references
563
+ // for locally mutated documents, we have to remove the target associations for these
564
+ // documents manually.
563
565
ImmutableSortedSet <DocumentKey > removedReferences =
564
566
localViewReferences .removeReferencesForId (queryData .getTargetId ());
565
567
for (DocumentKey key : removedReferences ) {
You can’t perform that action at this time.
0 commit comments