aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/www/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server/www/controllers')
-rw-r--r--src/main/java/com/juick/server/www/controllers/MessagesWWW.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/www/controllers/MessagesWWW.java b/src/main/java/com/juick/server/www/controllers/MessagesWWW.java
index 5d82b686..aa79ee0e 100644
--- a/src/main/java/com/juick/server/www/controllers/MessagesWWW.java
+++ b/src/main/java/com/juick/server/www/controllers/MessagesWWW.java
@@ -177,7 +177,9 @@ public class MessagesWWW {
model.addAttribute("showAdv",
paramShow == null && paramBefore == 0 && paramSearch == null && visitor.isAnonymous());
if (mids.size() >= 20) {
- String nextpage = (paramShow == null) ? "?to=" + msgs.get(msgs.size() - 1).getUpdated().toEpochMilli() : paramSearch != null ? String.format("?page=%d", page + 1) : "?before=" + mids.get(mids.size() - 1);
+ String nextpage = paramSearch != null ? String.format("?page=%d", page + 1)
+ : (paramShow == null) ? "?to=" + msgs.get(msgs.size() - 1).getUpdated().toEpochMilli()
+ : "?before=" + mids.get(mids.size() - 1);
if (paramShow != null) {
nextpage += "&show=" + paramShow;
}