X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=4534c35b2b73d19f66bf6c7c5e5a5c9616a0086e;hb=fdcd6fa4e0110028080d0b4a9ef3c5f8e5a5e867;hp=14bbcc4e05b5a3988d658c7cab20b1e317638911;hpb=455d843a2d2c785a317085e085d4265988b3c0da;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 14bbcc4..4534c35 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -43,6 +43,8 @@ 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.PostRemovedEvent; +import net.pterodactylus.sone.core.event.PostReplyRemovedEvent; import net.pterodactylus.sone.core.event.SoneRemovedEvent; import net.pterodactylus.sone.data.Album; import net.pterodactylus.sone.data.Image; @@ -899,25 +901,28 @@ public class WebInterface implements CoreListener { newSoneNotification.remove(soneRemovedEvent.sone()); } - // - // CORELISTENER METHODS - // - /** - * {@inheritDoc} + * Notifies the web interface that a {@link Post} was removed. + * + * @param postRemovedEvent + * The event */ - @Override - public void postRemoved(Post post) { - newPostNotification.remove(post); - localPostNotification.remove(post); - mentionNotification.remove(post); + @Subscribe + public void postRemoved(PostRemovedEvent postRemovedEvent) { + newPostNotification.remove(postRemovedEvent.post()); + localPostNotification.remove(postRemovedEvent.post()); + mentionNotification.remove(postRemovedEvent.post()); } /** - * {@inheritDoc} + * Notifies the web interface that a {@link PostReply} was removed. + * + * @param postReplyRemovedEvent + * The event */ - @Override - public void replyRemoved(PostReply reply) { + @Subscribe + public void replyRemoved(PostReplyRemovedEvent postReplyRemovedEvent) { + PostReply reply = postReplyRemovedEvent.postReply(); newReplyNotification.remove(reply); localReplyNotification.remove(reply); if (!getMentionedSones(reply.getText()).isEmpty()) { @@ -931,6 +936,10 @@ public class WebInterface implements CoreListener { } } + // + // CORELISTENER METHODS + // + /** * {@inheritDoc} */