Skip to content

Commit

Permalink
FEATURE: All on user page is now only should posts + topics
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Sep 11, 2014
1 parent 5267208 commit 70eb7b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/assets/javascripts/discourse/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ Discourse.User = Discourse.Model.extend({
if (this.blank('statsExcludingPms')) return 0;
var count = 0;
_.each(this.get('statsExcludingPms'), function(val) {
count += val.count;
if (val.action_type === Discourse.UserAction.TYPES.posts ||
val.action_type === Discourse.UserAction.TYPES.topics ) {
count += val.count;
}
});
return count;
}.property('statsExcludingPms.@each.count'),
Expand Down
6 changes: 6 additions & 0 deletions app/assets/javascripts/discourse/models/user_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ Discourse.UserStream = Discourse.Model.extend({
Discourse.UserAction.TYPES.mentions,
Discourse.UserAction.TYPES.quotes].join(",");
}

if(!filter) {
return [Discourse.UserAction.TYPES.posts,
Discourse.UserAction.TYPES.topics];
}

return filter;
}.property('filter'),

Expand Down

0 comments on commit 70eb7b8

Please sign in to comment.