X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=f9b6929b6a6650057586f6a3635738e8972e2e5a;hp=45ce1844b260295ce84259aec34d68d1053f9f46;hb=c8ec218c74a94810f5b416aa216b60382560a4d9;hpb=74223530641d7581c7d8f572e98eff1a01946ebd 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(); } /**