File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
packages/firestore/src/core Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ export interface Observer<T> {
46
46
* It handles "fan-out". -- Identical queries will re-use the same watch on the
47
47
* backend.
48
48
*
49
- * PORTING NOTE: On Web, EventManager requires a call to `subscribe()` to
50
- * register SyncEngine's `listen()` and `unlisten()` functionality . This allows
51
- * users to tree-shake the Watch logic.
49
+ * PORTING NOTE: On Web, EventManager `onListen` and `onUnlisten` need to be
50
+ * assigned to SyncEngine's `listen()` and `unlisten()` API before usage . This
51
+ * allows users to tree-shake the Watch logic.
52
52
*/
53
53
export class EventManager implements SyncEngineListener {
54
54
private queries = new ObjectMap < Query , QueryListenersInfo > (
Original file line number Diff line number Diff line change @@ -283,10 +283,8 @@ export class FirestoreClient {
283
283
this . syncEngine = onlineComponentProvider . syncEngine ;
284
284
this . eventMgr = onlineComponentProvider . eventManager ;
285
285
286
- this . eventMgr . subscribe (
287
- syncEngineListen . bind ( null , this . syncEngine ) ,
288
- syncEngineUnlisten . bind ( null , this . syncEngine )
289
- ) ;
286
+ this . eventMgr . onListen = syncEngineListen . bind ( null , this . syncEngine ) ;
287
+ this . eventMgr . onUnlisten = syncEngineUnlisten . bind ( null , this . syncEngine ) ;
290
288
291
289
// When a user calls clearPersistence() in one client, all other clients
292
290
// need to be terminated to allow the delete to succeed.
You can’t perform that action at this time.
0 commit comments