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.
This commit is contained in:
Toby Zerner 2015-06-24 11:45:58 +09:30
parent fcd1b081d9
commit cbb7e91eb4

View File

@ -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 });