Collapse user activity items loaded from message bus

This commit is contained in:
tms 2013-02-21 22:14:58 -05:00
parent 2b5be29d3c
commit b1c1053cf1

View file

@ -102,10 +102,17 @@
cache: 'false',
success: function(result) {
if (result) {
var action;
if ((_this.get('streamFilter') || result.action_type) !== result.action_type) {
return;
}
return stream.insertAt(0, Discourse.UserAction.create(result));
action = Em.A();
action.pushObject(Discourse.UserAction.create(result));
action = Discourse.UserAction.collapseStream(action);
return stream.insertAt(0, action[0]);
}
}
});