mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 21:43:38 +08:00
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:
parent
fcd1b081d9
commit
cbb7e91eb4
|
@ -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 });
|
||||
|
|
Loading…
Reference in New Issue
Block a user