FIX: Loading was broken on activity streams

This commit is contained in:
Robin Ward 2013-07-27 13:55:34 -04:00
parent 3a861c0823
commit a0cbbab37a

View File

@ -27,7 +27,12 @@ Discourse.UserStream = Discourse.Model.extend({
filterBy: function(filter) {
if (this.get('loaded') && (this.get('filter') === filter)) { return Ember.RSVP.resolve(); }
this.set('filter', filter);
this.setProperties({
filter: filter,
itemsLoaded: 0,
content: []
});
return this.findItems();
},
@ -35,11 +40,7 @@ Discourse.UserStream = Discourse.Model.extend({
var userStream = this;
if(this.get('loading')) { return Ember.RSVP.reject(); }
this.setProperties({
loading: true,
itemsLoaded: 0,
content: []
});
this.set('loading', true);
var url = this.get('baseUrl');
if (this.get('filterParam')) {