mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 00:43:39 +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() {
|
sortMap() {
|
||||||
return {
|
return {
|
||||||
recent: 'recent',
|
recent: '-lastTime',
|
||||||
replies: '-replies',
|
replies: '-commentsCount',
|
||||||
newest: '-created',
|
newest: '-startTime',
|
||||||
oldest: 'created'
|
oldest: '+startTime'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,11 +53,11 @@ export default class DiscussionList extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
terminalPostType() {
|
terminalPostType() {
|
||||||
return ['newest', 'oldest'].indexOf(this.props.sort) !== -1 ? 'start' : 'last'
|
return ['newest', 'oldest'].indexOf(this.props.params.sort) !== -1 ? 'start' : 'last'
|
||||||
}
|
}
|
||||||
|
|
||||||
countType() {
|
countType() {
|
||||||
return this.props.sort === 'replies' ? 'replies' : 'unread';
|
return this.props.params.sort === 'replies' ? 'replies' : 'unread';
|
||||||
}
|
}
|
||||||
|
|
||||||
loadResults(start) {
|
loadResults(start) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user