From ae550feea0394bfff147fa1946cfa8c357eacb8a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 2 Oct 2019 00:24:57 +0300 Subject: Fill Message::unread in single query --- src/main/java/com/juick/server/www/controllers/MessagesWWW.java | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/main/java/com/juick/server/www/controllers') diff --git a/src/main/java/com/juick/server/www/controllers/MessagesWWW.java b/src/main/java/com/juick/server/www/controllers/MessagesWWW.java index 501c0d82..d845aac6 100644 --- a/src/main/java/com/juick/server/www/controllers/MessagesWWW.java +++ b/src/main/java/com/juick/server/www/controllers/MessagesWWW.java @@ -168,7 +168,6 @@ public class MessagesWWW { msgs.stream().map(m -> m.getUser().getUid()).collect(Collectors.toList())); msgs.forEach(m -> { m.ReadOnly |= blUIDs.contains(m.getUser().getUid()); - m.setUnread(unread.contains(m.getMid())); }); } model.addAttribute("msgs", msgs); @@ -287,7 +286,6 @@ public class MessagesWWW { msgs.stream().map(m -> m.getUser().getUid()).collect(Collectors.toList())); msgs.forEach(m -> { m.ReadOnly |= blUIDs.contains(m.getUser().getUid()); - m.setUnread(unread.contains(m.getMid())); }); } model.addAttribute("msgs", msgs); @@ -428,7 +426,6 @@ public class MessagesWWW { ); msgs.forEach(m -> { m.ReadOnly |= blUIDs.contains(m.getUser().getUid()); - m.setUnread(unread.contains(m.getMid())); }); fillUserModel(model, visitor, visitor); } -- cgit v1.2.3