From 76714c213aae0334eaa8a759b14eeaa6dfa74c02 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 10 Sep 2018 12:09:39 +0300 Subject: Discuss as main page --- .../com/juick/server/www/controllers/MessagesWWW.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server/www/controllers') 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); -- cgit v1.2.3