Skip to content

Commit da28e5b

Browse files
Add missing Porting Notes (#1327)
1 parent f163738 commit da28e5b

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

packages/firestore/src/core/sync_engine.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,11 +1073,15 @@ export class SyncEngine implements RemoteSyncer, SharedClientStateSyncer {
10731073
}
10741074
}
10751075

1076+
// PORTING NOTE: Multi-tab only. In other clients, LocalStore is unaware of
1077+
// the online state.
10761078
enableNetwork(): Promise<void> {
10771079
this.localStore.setNetworkEnabled(true);
10781080
return this.remoteStore.enableNetwork();
10791081
}
10801082

1083+
// PORTING NOTE: Multi-tab only. In other clients, LocalStore is unaware of
1084+
// the online state.
10811085
disableNetwork(): Promise<void> {
10821086
this.localStore.setNetworkEnabled(false);
10831087
return this.remoteStore.disableNetwork();

packages/firestore/src/core/target_id_generator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export class TargetIdGenerator {
6565
* Returns the ID that follows the given ID. Subsequent calls to `next()`
6666
* use the newly returned target ID as their base.
6767
*/
68+
// PORTING NOTE: Multi-tab only.
6869
after(targetId: TargetId): TargetId {
6970
this.seek(targetId + (1 << RESERVED_BITS));
7071
return this.next();

packages/firestore/src/local/local_store.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ export class LocalStore {
179179
* In response the local store switches the mutation queue to the new user and
180180
* returns any resulting document changes.
181181
*/
182+
// PORTING NOTE: Android and iOS only return the documents affected by the
183+
// change.
182184
handleUserChange(user: User): Promise<UserChangeResult> {
183185
return this.persistence.runTransaction(
184186
'Handle user change',

packages/firestore/src/local/mutation_queue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export interface MutationQueue {
7373
* `removeMutationBatches()` has been called. Secondary clients return a
7474
* cached result until `removeCachedMutationKeys()` is invoked.
7575
*/
76+
// PORTING NOTE: Multi-tab only.
7677
lookupMutationKeys(
7778
transaction: PersistenceTransaction,
7879
batchId: BatchId

packages/firestore/src/local/query_cache.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ export interface QueryCache {
192192
* Allocated target IDs are persisted and `allocateTargetId()` will never
193193
* return the same ID twice.
194194
*/
195+
// PORTING NOTE: Multi-tab only.
195196
allocateTargetId(
196197
transaction: PersistenceTransaction
197198
): PersistencePromise<TargetId>;

0 commit comments

Comments
 (0)