@@ -176,16 +176,6 @@ export default class ObservableCollection {
176
176
return this . store . has ( docId ) ;
177
177
}
178
178
179
- /**
180
- * Sends the data to the multiplexer
181
- *
182
- * @param event
183
- * @param args
184
- */
185
- send ( event , ...args ) {
186
- this . multiplexer [ event ] . call ( null , ...args ) ;
187
- }
188
-
189
179
/**
190
180
* @param doc {Object}
191
181
* @param safe {Boolean} If this is set to true, it assumes that the object is cleaned
@@ -200,7 +190,7 @@ export default class ObservableCollection {
200
190
}
201
191
202
192
this . store . set ( doc . _id , doc ) ;
203
- this . send ( ' added' , doc . _id , doc ) ;
193
+ this . multiplexer . added ( doc . _id , doc ) ;
204
194
}
205
195
206
196
/**
@@ -213,7 +203,7 @@ export default class ObservableCollection {
213
203
this . store . set ( docId , doc ) ;
214
204
215
205
if ( doc ) {
216
- this . send ( ' added' , doc . _id , doc ) ;
206
+ this . multiplexer . added ( doc . _id , doc ) ;
217
207
}
218
208
}
219
209
@@ -241,7 +231,7 @@ export default class ObservableCollection {
241
231
) ;
242
232
243
233
if ( ! _ . isEmpty ( changed ) ) {
244
- this . send ( ' changed' , docId , changed ) ;
234
+ this . multiplexer . changed ( docId , changed ) ;
245
235
}
246
236
}
247
237
@@ -263,7 +253,7 @@ export default class ObservableCollection {
263
253
264
254
var changed = DiffSequence . makeChangedFields ( storedDoc , oldDoc ) ;
265
255
266
- this . send ( ' changed' , docId , changed ) ;
256
+ this . multiplexer . changed ( docId , changed ) ;
267
257
}
268
258
269
259
/**
@@ -273,7 +263,7 @@ export default class ObservableCollection {
273
263
const doc = this . store . pop ( docId ) ;
274
264
if ( doc != null ) {
275
265
try {
276
- this . send ( ' removed' , docId , doc ) ;
266
+ this . multiplexer . removed ( docId , doc ) ;
277
267
} catch ( e ) {
278
268
// Supressing `removed non-existent exceptions`
279
269
if ( ! isRemovedNonExistent ( e ) ) {
0 commit comments