From aa5777fc1cd04bcb73419ac65fa46f9816b50d12 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 16 Apr 2018 22:30:46 +0300 Subject: www: fix anonymous thread template --- juick-www/src/main/java/com/juick/www/controllers/MessagesWWW.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-www') 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 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 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); -- cgit v1.2.3