From: David ‘Bombe’ Roden Date: Tue, 31 May 2011 19:10:29 +0000 (+0200) Subject: Add Sone removal notification to core listener interface. X-Git-Tag: 0.6.5^2~18^2~2 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e95335fb0282d2910c005a35198ce58808c70ba3;p=Sone.git Add Sone removal notification to core listener interface. --- diff --git a/src/main/java/net/pterodactylus/sone/core/CoreListener.java b/src/main/java/net/pterodactylus/sone/core/CoreListener.java index fb83c9f..d34ac36 100644 --- a/src/main/java/net/pterodactylus/sone/core/CoreListener.java +++ b/src/main/java/net/pterodactylus/sone/core/CoreListener.java @@ -97,6 +97,14 @@ public interface CoreListener extends EventListener { public void markReplyKnown(Reply reply); /** + * Notifies a listener that the given Sone was removed. + * + * @param sone + * The removed Sone + */ + public void soneRemoved(Sone sone); + + /** * Notifies a listener that the given post was removed. * * @param post diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index b4fffd9..98539fe 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -745,6 +745,14 @@ public class WebInterface implements CoreListener { * {@inheritDoc} */ @Override + public void soneRemoved(Sone sone) { + newSoneNotification.remove(sone); + } + + /** + * {@inheritDoc} + */ + @Override public void postRemoved(Post post) { newPostNotification.remove(post); }