From 477821b541d5658661dca3c96561b217fe765162 Mon Sep 17 00:00:00 2001 From: Alex Bogdanovski Date: Wed, 3 May 2017 01:37:45 +0300 Subject: [PATCH] fixed answer sorting --- .../java/com/erudika/scoold/controllers/QuestionController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/erudika/scoold/controllers/QuestionController.java b/src/main/java/com/erudika/scoold/controllers/QuestionController.java index d93f77c6..93926f83 100755 --- a/src/main/java/com/erudika/scoold/controllers/QuestionController.java +++ b/src/main/java/com/erudika/scoold/controllers/QuestionController.java @@ -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 answerslist = showPost.getAnswers(itemcount); ArrayList list = new ArrayList(answerslist); list.add(showPost);