aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-12 11:36:11 +0300
committerGravatar Vitaly Takmazov2018-04-12 11:36:11 +0300
commitb23f3b9182d78dfabb37b6a1c21d060a365b2574 (patch)
treef783e6d6148d6eff893a3fdc2b9f490b01ec19a4 /juick-www/src/main/java
parent7be6ec73812f86bf09ff03e2b076ec6acd15eba4 (diff)
www: mark thread as read on first view
Diffstat (limited to 'juick-www/src/main/java')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/MessagesWWW.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/MessagesWWW.java b/juick-www/src/main/java/com/juick/www/controllers/MessagesWWW.java
index ecd60a52..80be605f 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/MessagesWWW.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/MessagesWWW.java
@@ -493,7 +493,6 @@ public class MessagesWWW {
return String.format("redirect:/%s/%d", msg.getUser().getName(), mid);
}
msg.VisitorCanComment = visitor.getUid() > 0;
- fillUserModel(model, user, visitor);
if (visitor.getUid() > 0) {
boolean isMsgAuthor = visitor.getUid() == msg.getUser().getUid();
boolean isInBL = userService.isInBLAny(msg.getUser().getUid(), visitor.getUid());
@@ -542,7 +541,8 @@ public class MessagesWWW {
model.addAttribute("visitorInBL", userService.isInBL(msg.getUser().getUid(), visitor.getUid()));
model.addAttribute("recomm", messagesService.getMessageRecommendations(msg.getMid()));
List<com.juick.Message> replies = messagesService.getReplies(visitor, msg.getMid());
-
+ // this should be after getReplies to mark thread as read
+ fillUserModel(model, user, visitor);
List<Integer> blUIDs = new ArrayList<>();
for (Message reply : replies) {
if (reply.getUser().getUid() != msg.getUser().getUid()