aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-16 22:30:46 +0300
committerGravatar Vitaly Takmazov2018-04-16 22:30:46 +0300
commitaa5777fc1cd04bcb73419ac65fa46f9816b50d12 (patch)
treed283662966fda82095d04eaeeb605c19f08f2fe5 /juick-www/src/main
parent495026b724562f1ce64a31937039aa95a01fb3c0 (diff)
www: fix anonymous thread template
Diffstat (limited to 'juick-www/src/main')
-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 78474f49..42bc5c49 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
@@ -508,11 +508,11 @@ public class MessagesWWW {
}
msg.VisitorCanComment = visitor.getUid() > 0;
List<com.juick.Message> replies = messagesService.getReplies(visitor, msg.getMid());
+ // this should be after getReplies to mark thread as read
+ fillUserModel(model, user, visitor);
if (visitor.getUid() > 0) {
List<Integer> unread = messagesService.getUnread(visitor);
visitor.setUnreadCount(unread.size());
- // this should be after getReplies to mark thread as read
- fillUserModel(model, user, visitor);
boolean isMsgAuthor = visitor.getUid() == msg.getUser().getUid();
boolean isInBL = userService.isInBLAny(msg.getUser().getUid(), visitor.getUid());
msg.VisitorCanComment = isMsgAuthor || !(msg.ReadOnly || isInBL);