From bab8f0823acba5f836865294a425b2fd76587771 Mon Sep 17 00:00:00 2001 From: Chris Thoburn Date: Mon, 17 Jun 2019 10:42:43 -0700 Subject: [PATCH] chore: remove dead sinceToken code --- packages/store/addon/-private/system/store.js | 7 +++---- packages/store/addon/-private/system/store/finders.js | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/store/addon/-private/system/store.js b/packages/store/addon/-private/system/store.js index 68ec2ab15a6..429920cd0f2 100644 --- a/packages/store/addon/-private/system/store.js +++ b/packages/store/addon/-private/system/store.js @@ -1970,7 +1970,6 @@ const Store = Service.extend({ */ _fetchAll(modelName, array, options = {}) { let adapter = this.adapterFor(modelName); - let sinceToken = this._internalModelsFor(modelName).metadata.since; assert(`You tried to load all records but you have no adapter (for ${modelName})`, adapter); assert( @@ -1980,14 +1979,14 @@ const Store = Service.extend({ if (options.reload) { set(array, 'isUpdating', true); - return promiseArray(_findAll(adapter, this, modelName, sinceToken, options)); + return promiseArray(_findAll(adapter, this, modelName, options)); } let snapshotArray = array._createSnapshot(options); if (adapter.shouldReloadAll(this, snapshotArray)) { set(array, 'isUpdating', true); - return promiseArray(_findAll(adapter, this, modelName, sinceToken, options)); + return promiseArray(_findAll(adapter, this, modelName, options)); } if (options.backgroundReload === false) { @@ -1996,7 +1995,7 @@ const Store = Service.extend({ if (options.backgroundReload || adapter.shouldBackgroundReloadAll(this, snapshotArray)) { set(array, 'isUpdating', true); - _findAll(adapter, this, modelName, sinceToken, options); + _findAll(adapter, this, modelName, options); } return promiseArray(Promise.resolve(array)); diff --git a/packages/store/addon/-private/system/store/finders.js b/packages/store/addon/-private/system/store/finders.js index 2c3e73827a4..56f0266091d 100644 --- a/packages/store/addon/-private/system/store/finders.js +++ b/packages/store/addon/-private/system/store/finders.js @@ -366,12 +366,12 @@ export function _findBelongsTo(adapter, store, internalModel, link, relationship ); } -export function _findAll(adapter, store, modelName, sinceToken, options) { +export function _findAll(adapter, store, modelName, options) { let modelClass = store.modelFor(modelName); // adapter.findAll depends on the class let recordArray = store.peekAll(modelName); let snapshotArray = recordArray._createSnapshot(options); let promise = Promise.resolve().then(() => - adapter.findAll(store, modelClass, sinceToken, snapshotArray) + adapter.findAll(store, modelClass, null, snapshotArray) ); let label = 'DS: Handle Adapter#findAll of ' + modelClass;