Use new sort criteria format

This commit is contained in:
Toby Zerner 2015-05-03 12:08:12 +09:30
parent ee6de22014
commit 8d406e5d24

View File

@ -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) {