X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=886383cad77b5f5e20443010cb27843e0522705f;hp=96b42b024f03e366ea9b3ff5e9438254b0e1ca62;hb=91cc17cf993ae2cb01864e48cf28a15afa2dc11e;hpb=ba4c1d2a5995657d48dce310ea854fa1f164a481 diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 96b42b0..886383c 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -45,6 +45,7 @@ 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.SoneInsertingEvent; import net.pterodactylus.sone.core.event.SoneLockedEvent; import net.pterodactylus.sone.core.event.SoneRemovedEvent; import net.pterodactylus.sone.core.event.SoneUnlockedEvent; @@ -972,22 +973,25 @@ public class WebInterface implements CoreListener { Ticker.getInstance().deregisterEvent(lockedSonesTickerObjects.remove(soneUnlockedEvent.sone())); } - // - // CORELISTENER METHODS - // - /** - * {@inheritDoc} + * Notifies the web interface that a {@link Sone} is being inserted. + * + * @param soneInsertingEvent + * The event */ - @Override - public void soneInserting(Sone sone) { - TemplateNotification soneInsertNotification = getSoneInsertNotification(sone); + @Subscribe + public void soneInserting(SoneInsertingEvent soneInsertingEvent) { + TemplateNotification soneInsertNotification = getSoneInsertNotification(soneInsertingEvent.sone()); soneInsertNotification.set("soneStatus", "inserting"); - if (sone.getOptions().getBooleanOption("EnableSoneInsertNotifications").get()) { + if (soneInsertingEvent.sone().getOptions().getBooleanOption("EnableSoneInsertNotifications").get()) { notificationManager.addNotification(soneInsertNotification); } } + // + // CORELISTENER METHODS + // + /** * {@inheritDoc} */