From 1f5869fcfe8c537d223b750754025cb2937d4bad Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Wed, 7 Mar 2018 14:53:23 +0300
Subject: drop replies tree
---
.../java/com/juick/www/controllers/Messages.java | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
(limited to 'juick-www/src/main/java/com/juick/www')
diff --git a/juick-www/src/main/java/com/juick/www/controllers/Messages.java b/juick-www/src/main/java/com/juick/www/controllers/Messages.java
index c83bb356..11dafda3 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/Messages.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/Messages.java
@@ -506,8 +506,8 @@ public class Messages {
protected String threadAction(ModelMap model,
@PathVariable String uname,
@PathVariable int mid,
- @CookieValue(name = "sape_cookie", required = false, defaultValue = StringUtils.EMPTY) String sapeCookie,
- @RequestParam(required = false, value = "view") String paramView) {
+ @CookieValue(name = "sape_cookie",
+ required = false, defaultValue = StringUtils.EMPTY) String sapeCookie) {
com.juick.User visitor = UserUtils.getCurrentUser();
if (!messagesService.canViewThread(mid, visitor.getUid())) {
@@ -533,29 +533,12 @@ public class Messages {
}
model.addAttribute("msg", msg);
- boolean listview = false;
- if (paramView != null) {
- if (paramView.equals("list")) {
- listview = true;
- if (visitor.getUid() > 0) {
- userService.setUserOptionInt(visitor.getUid(), "repliesview", 1);
- }
- } else if (paramView.equals("tree") && visitor.getUid() > 0) {
- userService.setUserOptionInt(visitor.getUid(), "repliesview", 0);
- }
- } else if (visitor.getUid() > 0 && userService.getUserOptionInt(visitor.getUid(), "repliesview", 0) == 1) {
- listview = true;
- }
- model.addAttribute("listview", listview);
String title = msg.getUser().getName() + ": " + msg.getTagsString();
model.addAttribute("title", title);
model.addAttribute("visitor", visitor);
String headers = "";
String pageUrl = "https://juick.com/" + msg.getUser().getName() + "/" + msg.getMid();
- if (paramView != null) {
- headers += "";
- }
if (msg.Hidden) {
headers += "";
}
--
cgit v1.2.3