diff options
author | 2018-09-10 12:09:39 +0300 | |
---|---|---|
committer | 2018-09-10 12:09:39 +0300 | |
commit | 76714c213aae0334eaa8a759b14eeaa6dfa74c02 (patch) | |
tree | 01fce1b7d0ac457cff2342a25e24c22cdaebb24f /juick-server/src/main/java/com/juick/server | |
parent | 4afffe9c0eafe035fb57e78a0de768219df1eadb (diff) |
Discuss as main page
Diffstat (limited to 'juick-server/src/main/java/com/juick/server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java b/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java index 06721912..53503cb5 100644 --- a/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java +++ b/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java @@ -111,17 +111,12 @@ public class MessagesWWW { title = "Поиск: " + StringEscapeUtils.escapeHtml4(paramSearch); mids = messagesService.getSearch(Utils.encodeSphinx(paramSearch), page); } else if (paramShow == null) { - if (!visitor.isAnonymous()) { - title = "Популярные"; - mids = messagesService.getPopular(visitor.getUid(), paramBefore); - model.addAttribute("discover", true); - } else { - title = "Микроблоги Juick: популярные записи"; - mids = messagesService.getPopular(0, paramBefore); - } - + title = "Обсуждения"; + mids = messagesService.getDiscussions(visitor.getUid(), paramTo); } else if (paramShow.equals("top")) { - return "redirect:/"; + title = "Популярные"; + mids = messagesService.getPopular(visitor.getUid(), paramBefore); + model.addAttribute("discover", true); } else if (paramShow.equals("my") && !visitor.isAnonymous()) { title = "Моя лента"; mids = messagesService.getMyFeed(visitor.getUid(), paramBefore, true); @@ -129,8 +124,7 @@ public class MessagesWWW { title = "Приватные"; mids = messagesService.getPrivate(visitor.getUid(), paramBefore); } else if (paramShow.equals("discuss")) { - title = "Обсуждения"; - mids = messagesService.getDiscussions(visitor.getUid(), paramTo); + return "redirect:/"; } else if (paramShow.equals("recommended") && !visitor.isAnonymous()) { title = "Рекомендации"; mids = messagesService.getRecommended(visitor.getUid(), paramBefore); |