X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=46506259d309b63035dc6679ebb345b25f14cc4c;hb=7d89048a7d5e9890d130f37994e8b4a410e692f0;hp=40e5708b3f56db6aa3b3066c881e57890767c081;hpb=5c5bee980f9cab5792e34d1c9840f73b8b191830;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 40e5708..4650625 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -17,8 +17,8 @@ package net.pterodactylus.sone.web; -import static com.google.common.collect.FluentIterable.from; import static java.util.logging.Logger.getLogger; +import static java.util.stream.Collectors.toSet; import java.util.Collection; import java.util.Set; @@ -264,7 +264,7 @@ public class WebInterface implements SessionProvider { .addAll(newPostNotification.getElements()) .addAll(localPostNotification.getElements()) .build(); - return from(allNewPosts).filter(postVisibilityFilter.isVisible(currentSone)).toSet(); + return allNewPosts.stream().filter(p -> postVisibilityFilter.isPostVisible(currentSone, p)).collect(toSet()); } @Nonnull @@ -273,7 +273,7 @@ public class WebInterface implements SessionProvider { .addAll(newReplyNotification.getElements()) .addAll(localReplyNotification.getElements()) .build(); - return from(allNewReplies).filter(replyVisibilityFilter.isVisible(currentSone)).toSet(); + return allNewReplies.stream().filter(r -> replyVisibilityFilter.isReplyVisible(currentSone, r)).collect(toSet()); } //