From 3bfdb2dd5b101c73e952342148e76b5218fd1958 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Wed, 13 Feb 2013 21:18:06 +1100 Subject: [PATCH] missed this. was inserting dupes when loading more --- app/assets/javascripts/discourse/models/user.js.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/models/user.js.coffee b/app/assets/javascripts/discourse/models/user.js.coffee index 7df54d34add..33e1e6390b7 100644 --- a/app/assets/javascripts/discourse/models/user.js.coffee +++ b/app/assets/javascripts/discourse/models/user.js.coffee @@ -88,9 +88,11 @@ window.Discourse.User = Discourse.Model.extend Discourse.Presence, cache: 'false' success: (result)=> if result and result.user_actions and result.user_actions.each + copy = Em.A() result.user_actions.each (i)=> - stream.pushObject(Discourse.UserAction.create(i)) - stream = Discourse.UserAction.collapseStream(stream) + copy.pushObject(Discourse.UserAction.create(i)) + copy = Discourse.UserAction.collapseStream(copy) + stream.pushObjects(copy) @set('stream', stream) callback() if callback