From 49039945a1c6964b173e9b96b67b5fe610f48000 Mon Sep 17 00:00:00 2001
From: makc
Date: Wed, 19 Apr 2017 14:28:05 +0200
Subject: quick fix for 0 replies issue
---
.../java/com/juick/www/controllers/UserThread.java | 54 +++++++++++-----------
1 file changed, 28 insertions(+), 26 deletions(-)
diff --git a/juick-www/src/main/java/com/juick/www/controllers/UserThread.java b/juick-www/src/main/java/com/juick/www/controllers/UserThread.java
index 0aeac4c6..c3a2a24e 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/UserThread.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/UserThread.java
@@ -244,6 +244,32 @@ public class UserThread {
}
}
+ boolean foldable = false;
+ if (replies.size() > 10) {
+ for (int i = 0; i < replies.size() - 1; i++) {
+ if (replies.get(i).getChildsCount() > 1) {
+ foldable = true;
+ break;
+ }
+ }
+ }
+
+ out.println("
");
+ out.print("
");
+ out.println("
Ответы (" + replies.size() + ")
");
+ out.println("
");
+
+ out.println("");
+
if (!replies.isEmpty()) {
if (visitor.getUid() > 0 && msg.getUser().getUid() == visitor.getUid()) {
for (Message reply : replies) {
@@ -260,43 +286,19 @@ public class UserThread {
}
}
- boolean foldable = false;
- if (replies.size() > 10) {
- for (int i = 0; i < replies.size() - 1; i++) {
- if (replies.get(i).getChildsCount() > 1) {
- foldable = true;
- break;
- }
- }
- }
-
- out.println("");
- out.print("
");
- out.println("
Ответы (" + replies.size() + ")
");
- out.println("
");
-
- out.println("");
if (listview) {
printList(out, replies, visitor);
} else {
printTree(out, replies, visitor, 0, 0, false);
}
- out.println("
");
for (Message reply : replies) {
reply.cleanupChilds();
}
replies.clear();
}
+
+ out.println("
");
}
public void printTree(PrintWriter out, List replies, com.juick.User visitor, int ReplyTo, int margin, boolean hidden) {
--
cgit v1.2.3