X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=96b42b024f03e366ea9b3ff5e9438254b0e1ca62;hp=9e5e0ebbdcf3d693c92a6635358286d0aadfa054;hb=ba4c1d2a5995657d48dce310ea854fa1f164a481;hpb=de3f83202862d1b12505eff4da668a736a355b72 diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 9e5e0eb..96b42b0 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -47,6 +47,7 @@ import net.pterodactylus.sone.core.event.PostRemovedEvent; import net.pterodactylus.sone.core.event.PostReplyRemovedEvent; import net.pterodactylus.sone.core.event.SoneLockedEvent; import net.pterodactylus.sone.core.event.SoneRemovedEvent; +import net.pterodactylus.sone.core.event.SoneUnlockedEvent; import net.pterodactylus.sone.data.Album; import net.pterodactylus.sone.data.Image; import net.pterodactylus.sone.data.Post; @@ -959,19 +960,22 @@ public class WebInterface implements CoreListener { lockedSonesTickerObjects.put(sone, tickerObject); } - // - // CORELISTENER METHODS - // - /** - * {@inheritDoc} + * Notifies the web interface that a Sone was unlocked. + * + * @param soneUnlockedEvent + * The event */ - @Override - public void soneUnlocked(Sone sone) { - lockedSonesNotification.remove(sone); - Ticker.getInstance().deregisterEvent(lockedSonesTickerObjects.remove(sone)); + @Subscribe + public void soneUnlocked(SoneUnlockedEvent soneUnlockedEvent) { + lockedSonesNotification.remove(soneUnlockedEvent.sone()); + Ticker.getInstance().deregisterEvent(lockedSonesTickerObjects.remove(soneUnlockedEvent.sone())); } + // + // CORELISTENER METHODS + // + /** * {@inheritDoc} */