From a7e3fb280672fe832711199f964df6e2b288278b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 7 Jun 2011 14:42:18 +0200 Subject: [PATCH] Remove replies to unknown posts from status. --- .../java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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 07fdfa8..246cbed 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java @@ -127,6 +127,14 @@ public class GetStatusAjaxPage extends JsonPage { }); } + /* remove replies to unknown posts. */ + newReplies = Filters.filteredSet(newReplies, new Filter() { + + @Override + public boolean filterObject(Reply reply) { + return reply.getPost() != null; + } + }); JsonArray jsonReplies = new JsonArray(); for (Reply reply : newReplies) { JsonObject jsonReply = new JsonObject(); -- 2.7.4