From: David ‘Bombe’ Roden Date: Fri, 6 May 2011 22:40:39 +0000 (+0200) Subject: Use post- and reply-visibility methods. X-Git-Tag: 0.6.4^2~14 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=00271cc31bb7f28d4917a54d384aff58983f0a07;p=Sone.git Use post- and reply-visibility methods. --- diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java index 9531a6d..b28b82e 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java @@ -93,7 +93,7 @@ public class GetStatusAjaxPage extends JsonPage { @Override public boolean filterObject(Post post) { - return currentSone.hasFriend(post.getSone().getId()) || currentSone.equals(post.getSone()) || currentSone.equals(post.getRecipient()); + return ListNotificationFilters.isPostVisible(currentSone, post); } }); @@ -114,7 +114,7 @@ public class GetStatusAjaxPage extends JsonPage { @Override public boolean filterObject(Reply reply) { - return (reply.getPost() != null) && (reply.getPost().getSone() != null) && (currentSone.hasFriend(reply.getPost().getSone().getId()) || currentSone.equals(reply.getPost().getSone()) || currentSone.equals(reply.getPost().getRecipient())); + return ListNotificationFilters.isReplyVisible(currentSone, reply); } });