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