@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);
}
});
@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);
}
});