From e95335fb0282d2910c005a35198ce58808c70ba3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 31 May 2011 21:10:29 +0200 Subject: [PATCH] Add Sone removal notification to core listener interface. --- src/main/java/net/pterodactylus/sone/core/CoreListener.java | 8 ++++++++ src/main/java/net/pterodactylus/sone/web/WebInterface.java | 8 ++++++++ 2 files changed, 16 insertions(+) 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); } -- 2.7.4