From fee88508ba1eb4398b2ac3699b82c5388db5c7e6 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 24 Jun 2015 11:45:58 +0930 Subject: [PATCH] Only display the first page of posts Extra posts may be in the payload (mention links etc.) but we do not want to display them. --- js/forum/src/components/discussion-page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/forum/src/components/discussion-page.js b/js/forum/src/components/discussion-page.js index 25235430a..30f3be46a 100644 --- a/js/forum/src/components/discussion-page.js +++ b/js/forum/src/components/discussion-page.js @@ -97,7 +97,7 @@ export default class DiscussionPage extends mixin(Component, evented) { includedPosts.push(app.store.getById('posts', record.id)); } }); - includedPosts.sort((a, b) => a.id() - b.id()); + includedPosts.sort((a, b) => a.id() - b.id()).splice(20); } this.stream = new PostStream({ discussion, includedPosts });