diff options
author | 2019-04-14 11:09:07 +0300 | |
---|---|---|
committer | 2019-04-14 11:09:07 +0300 | |
commit | 89dcf742f471f26424664cc705f95fb2fd5a1da7 (patch) | |
tree | 3ef82181bfd098dcdb9d7c25671e7b8f9fbecce2 /src/main/java/com/juick | |
parent | 16f471e8d9eddbf57b6ebcbe68cf18df57f5ae48 (diff) |
Fix search paging
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r-- | src/main/java/com/juick/server/www/controllers/MessagesWWW.java | 4 |
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; } |