diff --git a/app/assets/javascripts/discourse/models/topic_list.js b/app/assets/javascripts/discourse/models/topic_list.js index cf393d5af..0402f4ac1 100644 --- a/app/assets/javascripts/discourse/models/topic_list.js +++ b/app/assets/javascripts/discourse/models/topic_list.js @@ -197,12 +197,9 @@ Discourse.TopicList.reopenClass({ **/ list: function(filter, params) { var session = Discourse.Session.current(), - list = params["cache"] && session.get('topicList'), + list = session.get('topicList'), tracking = Discourse.TopicTrackingState.current(); - // only used to control caching - delete params["cache"]; - return new Ember.RSVP.Promise(function(resolve) { // Try to use the cached version if (list && (list.get('filter') === filter) && diff --git a/app/assets/javascripts/discourse/routes/build-category-route.js.es6 b/app/assets/javascripts/discourse/routes/build-category-route.js.es6 index 3a5d4156b..f060bb42d 100644 --- a/app/assets/javascripts/discourse/routes/build-category-route.js.es6 +++ b/app/assets/javascripts/discourse/routes/build-category-route.js.es6 @@ -52,8 +52,6 @@ export default function(filter, params) { var findOpts = filterQueryParams(transaction.queryParams, params); - findOpts["cache"] = this.get("router.location.poppedState"); - return Discourse.TopicList.list(listFilter, findOpts).then(function(list) { // If all the categories are the same, we can hide them var hideCategory = !list.get('topics').find(function (t) { return t.get('category') !== model; }); diff --git a/app/assets/javascripts/discourse/routes/build-topic-route.js.es6 b/app/assets/javascripts/discourse/routes/build-topic-route.js.es6 index 8602ff1f1..e92464e4f 100644 --- a/app/assets/javascripts/discourse/routes/build-topic-route.js.es6 +++ b/app/assets/javascripts/discourse/routes/build-topic-route.js.es6 @@ -21,15 +21,12 @@ export default function(filter, extras) { this.controllerFor('navigation/default').set('filterMode', filter); }, - model: function(data, transition) { + model: function(data, transaction) { // attempt to stop early cause we need this to be called before .sync Discourse.ScreenTrack.current().stop(); - var findOpts = filterQueryParams(transition.queryParams); - - findOpts["cache"] = this.get("router.location.poppedState"); - + var findOpts = filterQueryParams(transaction.queryParams); return Discourse.TopicList.list(filter, findOpts); }, diff --git a/app/assets/javascripts/discourse/routes/discourse_location.js b/app/assets/javascripts/discourse/routes/discourse_location.js index be3f0d939..9dda10165 100644 --- a/app/assets/javascripts/discourse/routes/discourse_location.js +++ b/app/assets/javascripts/discourse/routes/discourse_location.js @@ -189,8 +189,6 @@ Ember.DiscourseLocation = Ember.Object.extend({ popstateCallbacks.forEach(function(cb) { cb(url); }); - - self.set('poppedState',true); callback(url); }); }, diff --git a/app/assets/javascripts/discourse/routes/discourse_route.js b/app/assets/javascripts/discourse/routes/discourse_route.js index e030e75e7..b43148b05 100644 --- a/app/assets/javascripts/discourse/routes/discourse_route.js +++ b/app/assets/javascripts/discourse/routes/discourse_route.js @@ -19,15 +19,6 @@ Discourse.Route = Em.Route.extend({ activate: function() { this._super(); Em.run.scheduleOnce('afterRender', Discourse.Route, 'cleanDOM'); - - // the chain of events sucks, we get an event from discourse location - // it goes ahead and sets it, then it call model, then it deactivates - // old route and activates new - // - // if we want to pin this on the location, we need to amend onUpdateURL - // to pass this in to the callback it gets, this would require ember - // API changes - this.set('router.location.poppedState', false); }, redirectIfLoginRequired: function() {