1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Rename discussion.startPost

This commit is contained in:
Toby Zerner
2018-08-24 20:42:07 +09:30
parent cbd0643540
commit e241518506
9 changed files with 16 additions and 16 deletions

View File

@@ -156,7 +156,7 @@ export default class DiscussionListItem extends Component {
*
* @return {Boolean}
*/
showStartPost() {
showFirstPost() {
return ['newest', 'oldest'].indexOf(this.props.params.sort) !== -1;
}
@@ -192,7 +192,7 @@ export default class DiscussionListItem extends Component {
const items = new ItemList();
if (this.props.params.q) {
const post = this.props.discussion.mostRelevantPost() || this.props.discussion.startPost();
const post = this.props.discussion.mostRelevantPost() || this.props.discussion.firstPost();
if (post && post.contentType() === 'comment') {
const excerpt = highlight(post.contentPlain(), this.highlightRegExp, 175);
@@ -202,7 +202,7 @@ export default class DiscussionListItem extends Component {
items.add('terminalPost',
TerminalPost.component({
discussion: this.props.discussion,
lastPost: !this.showStartPost()
lastPost: !this.showFirstPost()
})
);
}