From: David ‘Bombe’ Roden Date: Wed, 27 Apr 2011 19:47:00 +0000 (+0200) Subject: Use method. X-Git-Tag: 0.6.3^2~6 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d138151b18222c458eba19528a2a2a9f07ca5a9e;p=Sone.git Use method. --- diff --git a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java index 7491e70..207f4cc 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java @@ -93,7 +93,7 @@ public class ListNotificationFilters { } List newPosts = new ArrayList(); for (Post post : newPostNotification.getElements()) { - if ((post.getSone() != null) && (currentSone.hasFriend(post.getSone().getId()) || currentSone.equals(post.getSone()) || currentSone.equals(post.getRecipient()))) { + if (isPostVisible(currentSone, post)) { newPosts.add(post); } } @@ -128,7 +128,7 @@ public class ListNotificationFilters { } List newReplies = new ArrayList(); for (Reply reply : newReplyNotification.getElements()) { - if (((reply.getPost().getSone() != null) && currentSone.hasFriend(reply.getPost().getSone().getId())) || currentSone.equals(reply.getPost().getSone()) || currentSone.equals(reply.getPost().getRecipient())) { + if (isPostVisible(currentSone, reply.getPost())) { newReplies.add(reply); } }