Skip to content

Commit

Permalink
fixed answer sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
albogdano committed May 2, 2017
1 parent 9d54678 commit 477821b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public String get(@PathVariable String id, @PathVariable(required = false) Strin
}

Pager itemcount = utils.getPager("page", req);
itemcount.setSortby("newest".equals(sortby) ? "" : "votes");
itemcount.setSortby("newest".equals(sortby) ? "timestamp" : "votes");
List<Reply> answerslist = showPost.getAnswers(itemcount);
ArrayList<Post> list = new ArrayList<Post>(answerslist);
list.add(showPost);
Expand Down

0 comments on commit 477821b

Please sign in to comment.