diff options
Diffstat (limited to 'src/main/java/com/juick/www/controllers/Site.java')
-rw-r--r-- | src/main/java/com/juick/www/controllers/Site.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java index dcb89718..dadf7ed6 100644 --- a/src/main/java/com/juick/www/controllers/Site.java +++ b/src/main/java/com/juick/www/controllers/Site.java @@ -95,7 +95,7 @@ public class Site { model.addAttribute("tagStats", tagService.getUserTagStats(user.getUid()).stream() .sorted((e1, e2) -> Integer.compare(e2.getUsageCount(), e1.getUsageCount())).limit(20) - .map(t -> t.getTag().getName()).collect(Collectors.toList())); + .map(t -> t.getTag().getName()).toList()); } @GetMapping("/login") @@ -195,7 +195,7 @@ public class Site { List<Integer> unread = messagesService.getUnread(visitor); visitor.setUnreadCount(unread.size()); List<Integer> blUIDs = userService.checkBL(visitor.getUid(), - msgs.stream().map(m -> m.getUser().getUid()).collect(Collectors.toList())); + msgs.stream().map(m -> m.getUser().getUid()).toList()); msgs.forEach(m -> m.ReadOnly |= blUIDs.contains(m.getUser().getUid())); } model.addAttribute("msgs", msgs); @@ -301,7 +301,7 @@ public class Site { List<Integer> unread = messagesService.getUnread(visitor); visitor.setUnreadCount(unread.size()); List<Integer> blUIDs = userService.checkBL(visitor.getUid(), - msgs.stream().map(m -> m.getUser().getUid()).collect(Collectors.toList())); + msgs.stream().map(m -> m.getUser().getUid()).toList()); msgs.forEach(m -> m.ReadOnly |= blUIDs.contains(m.getUser().getUid())); } model.addAttribute("msgs", msgs); @@ -338,7 +338,7 @@ public class Site { model.addAttribute("tags", tagService.getUserTagStats(user.getUid()).stream() .sorted((e1, e2) -> Integer.compare(e2.getUsageCount(), e1.getUsageCount())) - .map(t -> t.getTag().getName()).collect(Collectors.toList())); + .map(t -> t.getTag().getName()).toList()); return "views/blog_tags"; } @@ -423,7 +423,7 @@ public class Site { List<Integer> unread = messagesService.getUnread(visitor); visitor.setUnreadCount(unread.size()); List<Integer> blUIDs = userService.checkBL(visitor.getUid(), - msgs.stream().map(m -> m.getUser().getUid()).collect(Collectors.toList())); + msgs.stream().map(m -> m.getUser().getUid()).toList()); msgs.forEach(m -> m.ReadOnly |= blUIDs.contains(m.getUser().getUid())); fillUserModel(model, visitor, visitor); } @@ -569,7 +569,7 @@ public class Site { model.addAttribute("visitorSubscribed", messagesService.isSubscribed(visitor.getUid(), msg.getMid())); model.addAttribute("visitorInBL", userService.isInBL(msg.getUser().getUid(), visitor.getUid())); model.addAttribute("recomm", messagesService.getMessagesRecommendations(Collections.singletonList(msg.getMid())) - .stream().map(Pair::getRight).collect(Collectors.toList())); + .stream().map(Pair::getRight).toList()); List<Integer> blUIDs = new ArrayList<>(); for (Message reply : replies) { if (reply.getUser().getUid() != msg.getUser().getUid() && !blUIDs.contains(reply.getUser().getUid())) { @@ -609,7 +609,7 @@ public class Site { model.addAttribute("tags", tagService.getUserTagStats(visitor.getUid()).stream() .sorted((e1, e2) -> Integer.compare(e2.getUsageCount(), e1.getUsageCount())) - .map(t -> t.getTag().getName()).collect(Collectors.toList())); + .map(t -> t.getTag().getName()).toList()); return "views/post"; } |