From f7b3856101573a9146c8b1f53463d9c192cf55b0 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 14 Feb 2014 14:02:43 -0500 Subject: [PATCH] FIX: Don't append posts directly to the stream unless all posts are loaded. --- app/assets/javascripts/discourse/models/post_stream.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/models/post_stream.js b/app/assets/javascripts/discourse/models/post_stream.js index 880ad5307..cb13182a6 100644 --- a/app/assets/javascripts/discourse/models/post_stream.js +++ b/app/assets/javascripts/discourse/models/post_stream.js @@ -413,7 +413,9 @@ Discourse.PostStream = Em.Object.extend({ @param {Discourse.Post} the post we saved in the stream. **/ commitPost: function(post) { - this.appendPost(post); + if (this.get('loadedAllPosts')) { + this.appendPost(post); + } this.get('stream').addObject(post.get('id')); this.set('stagingPost', false); },