Convert “Sone removed” into EventBus-based event.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / WebInterface.java
index b6d2d37..14bbcc4 100644 (file)
@@ -43,6 +43,7 @@ import net.pterodactylus.sone.core.event.MarkSoneKnownEvent;
 import net.pterodactylus.sone.core.event.NewPostFoundEvent;
 import net.pterodactylus.sone.core.event.NewPostReplyFoundEvent;
 import net.pterodactylus.sone.core.event.NewSoneFoundEvent;
+import net.pterodactylus.sone.core.event.SoneRemovedEvent;
 import net.pterodactylus.sone.data.Album;
 import net.pterodactylus.sone.data.Image;
 import net.pterodactylus.sone.data.Post;
@@ -887,18 +888,21 @@ public class WebInterface implements CoreListener {
                mentionNotification.remove(markPostReplyKnownEvent.postReply().getPost());
        }
 
-       //
-       // CORELISTENER METHODS
-       //
-
        /**
-        * {@inheritDoc}
+        * Notifies the web interface that a {@link Sone} was removed.
+        *
+        * @param soneRemovedEvent
+        *            The event
         */
-       @Override
-       public void soneRemoved(Sone sone) {
-               newSoneNotification.remove(sone);
+       @Subscribe
+       public void soneRemoved(SoneRemovedEvent soneRemovedEvent) {
+               newSoneNotification.remove(soneRemovedEvent.sone());
        }
 
+       //
+       // CORELISTENER METHODS
+       //
+
        /**
         * {@inheritDoc}
         */