From c8ec218c74a94810f5b416aa216b60382560a4d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 18 Jun 2011 16:24:41 +0200 Subject: [PATCH] Return new local elements with new remote elements. --- src/main/java/net/pterodactylus/sone/web/WebInterface.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 45ce184..f9b6929 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -100,6 +100,7 @@ import net.pterodactylus.util.cache.CacheItem; import net.pterodactylus.util.cache.DefaultCacheItem; import net.pterodactylus.util.cache.MemoryCache; import net.pterodactylus.util.cache.ValueRetriever; +import net.pterodactylus.util.collection.SetBuilder; import net.pterodactylus.util.filter.Filters; import net.pterodactylus.util.logging.Logging; import net.pterodactylus.util.notify.Notification; @@ -428,7 +429,7 @@ public class WebInterface implements CoreListener { * @return The new posts */ public Set getNewPosts() { - return new HashSet(newPostNotification.getElements()); + return new SetBuilder().addAll(newPostNotification.getElements()).addAll(localPostNotification.getElements()).get(); } /** @@ -438,7 +439,7 @@ public class WebInterface implements CoreListener { * @return The new replies */ public Set getNewReplies() { - return new HashSet(newReplyNotification.getElements()); + return new SetBuilder().addAll(newReplyNotification.getElements()).addAll(localReplyNotification.getElements()).get(); } /** -- 2.7.4