mirror of
https://github.com/flarum/framework.git
synced 2024-12-03 15:43:59 +08:00
Use new sort criteria format
This commit is contained in:
parent
ee6de22014
commit
8d406e5d24
|
@ -33,10 +33,10 @@ export default class DiscussionList extends Component {
|
|||
|
||||
sortMap() {
|
||||
return {
|
||||
recent: 'recent',
|
||||
replies: '-replies',
|
||||
newest: '-created',
|
||||
oldest: 'created'
|
||||
recent: '-lastTime',
|
||||
replies: '-commentsCount',
|
||||
newest: '-startTime',
|
||||
oldest: '+startTime'
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -53,11 +53,11 @@ export default class DiscussionList extends Component {
|
|||
}
|
||||
|
||||
terminalPostType() {
|
||||
return ['newest', 'oldest'].indexOf(this.props.sort) !== -1 ? 'start' : 'last'
|
||||
return ['newest', 'oldest'].indexOf(this.props.params.sort) !== -1 ? 'start' : 'last'
|
||||
}
|
||||
|
||||
countType() {
|
||||
return this.props.sort === 'replies' ? 'replies' : 'unread';
|
||||
return this.props.params.sort === 'replies' ? 'replies' : 'unread';
|
||||
}
|
||||
|
||||
loadResults(start) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user