mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 10:08:20 -05:00
Revert "FIX: unread/new counts out of sync with tabs"
This reverts commit c093187d34
.
This commit is contained in:
parent
598a3f3e10
commit
a96ba8ed78
5 changed files with 3 additions and 22 deletions
|
@ -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) &&
|
||||
|
|
|
@ -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; });
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
||||
|
|
|
@ -189,8 +189,6 @@ Ember.DiscourseLocation = Ember.Object.extend({
|
|||
popstateCallbacks.forEach(function(cb) {
|
||||
cb(url);
|
||||
});
|
||||
|
||||
self.set('poppedState',true);
|
||||
callback(url);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue