Revert "FIX: unread/new counts out of sync with tabs"

This reverts commit c093187d34.
This commit is contained in:
Robin Ward 2014-09-09 11:37:13 -04:00
parent 598a3f3e10
commit a96ba8ed78
5 changed files with 3 additions and 22 deletions

View file

@ -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) &&

View file

@ -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; });

View file

@ -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);
},

View file

@ -189,8 +189,6 @@ Ember.DiscourseLocation = Ember.Object.extend({
popstateCallbacks.forEach(function(cb) {
cb(url);
});
self.set('poppedState',true);
callback(url);
});
},

View file

@ -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() {