aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-10-02 00:24:57 +0300
committerGravatar Vitaly Takmazov2019-10-02 00:24:57 +0300
commitae550feea0394bfff147fa1946cfa8c357eacb8a (patch)
treefe352d7702e921afa247ef0c5f59d7fde1d0b7f9 /src/main/java/com/juick/server
parent0ad4a26ab6b78b8bb3123faed6fcfaff807f49f3 (diff)
Fill Message::unread in single query
Diffstat (limited to 'src/main/java/com/juick/server')
-rw-r--r--src/main/java/com/juick/server/www/controllers/MessagesWWW.java3
1 files changed, 0 insertions, 3 deletions
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);
}