From db7bccdf89c0f375fb1a8e39d084095942a4ba92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=CC=81o=20mathieu?= Date: Fri, 27 May 2016 19:25:32 -0400 Subject: [PATCH] Removes startMeteorSubscriptions --- src/components/Mixin.js | 45 ----------------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/components/Mixin.js b/src/components/Mixin.js index 1019b1d..025e96d 100644 --- a/src/components/Mixin.js +++ b/src/components/Mixin.js @@ -12,12 +12,6 @@ export default { const newData = this._meteorDataManager.calculateData(); this._meteorDataManager.updateData(newData); } - - if(this.startMeteorSubscriptions) { - console.warn('startMeteorSubscriptions is deprecated and will be removed soon. Please create your subscriptions in getMeteorData.'); - this._meteorSubscriptionsManager = new MeteorSubscriptionsManager(this); - this._meteorSubscriptionsManager.getMeteorSubscriptions(); - } }); @@ -67,45 +61,6 @@ export default { }; - - - -class MeteorSubscriptionsManager { - constructor(component) { - this.component = component; - this.computation = null; - - this._meteorSubscriptionsDep = new Trackr.Dependency(); - - this._meteorDataChangedCallback = ()=>{this._meteorSubscriptionsDep.changed()}; - - Data.onChange(this._meteorDataChangedCallback); - } - dispose() { - if (this.computation) { - this.computation.stop(); - this.computation = null; - } - - Data.offChange(this._meteorDataChangedCallback); - } - stateOrPropsChanged() { - - } - getMeteorSubscriptions() { - this.computation = Trackr.nonreactive(() => { - return Trackr.autorun((c) => { - this._meteorSubscriptionsDep.depend(); - - this.component.startMeteorSubscriptions(); - - }); - }); - } - -} - - // A class to keep the state and utility methods needed to manage // the Meteor data for a component. class MeteorDataManager {