Skip to content

Commit 9db213e

Browse files
Reduce diff
1 parent fdff9cd commit 9db213e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

packages/firestore/src/core/sync_engine.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,17 @@ export class SyncEngine implements RemoteSyncer, SharedClientStateSyncer {
279279
*/
280280
// PORTING NOTE: Multi-tab only.
281281
private async synchronizeViewAndComputeSnapshot(
282-
queryData: QueryData,
283-
view: View
282+
queryView: QueryView
284283
): Promise<ViewChange> {
285284
const queryResult = await this.localStore.executeQuery(
286-
queryData.query,
285+
queryView.query,
287286
/* usePreviousResults= */ true
288287
);
289-
const viewSnapshot = view.synchronizeWithPersistedState(queryResult);
288+
const viewSnapshot = queryView.view.synchronizeWithPersistedState(
289+
queryResult
290+
);
290291
if (this.isPrimary) {
291-
this.updateTrackedLimbos(queryData.targetId, viewSnapshot.limboChanges);
292+
this.updateTrackedLimbos(queryView.targetId, viewSnapshot.limboChanges);
292293
}
293294
return viewSnapshot;
294295
}
@@ -936,8 +937,7 @@ export class SyncEngine implements RemoteSyncer, SharedClientStateSyncer {
936937
);
937938
queryData = await this.localStore.allocateQuery(queryView.query);
938939
const viewChange = await this.synchronizeViewAndComputeSnapshot(
939-
queryData,
940-
queryView.view
940+
queryView
941941
);
942942
if (viewChange.snapshot) {
943943
newViewSnapshots.push(viewChange.snapshot);

packages/firestore/src/local/local_store.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -872,16 +872,16 @@ export class LocalStore {
872872
});
873873
}
874874
})
875-
.next(() => {
876-
return this.queryEngine.getDocumentsMatchingQuery(
875+
.next(() =>
876+
this.queryEngine.getDocumentsMatchingQuery(
877877
txn,
878878
query,
879879
usePreviousResults
880880
? lastLimboFreeSnapshotVersion
881881
: SnapshotVersion.MIN,
882882
usePreviousResults ? remoteKeys : documentKeySet()
883-
);
884-
})
883+
)
884+
)
885885
.next(documents => {
886886
return { documents, remoteKeys };
887887
});

0 commit comments

Comments
 (0)