Convert “Sone marked as known” into EventBus-based event.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / WebInterface.java
index 7432e5f..224dc69 100644 (file)
@@ -37,6 +37,7 @@ import java.util.logging.Logger;
 
 import net.pterodactylus.sone.core.Core;
 import net.pterodactylus.sone.core.CoreListener;
+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;
@@ -838,18 +839,18 @@ public class WebInterface implements CoreListener {
                }
        }
 
-       //
-       // CORELISTENER METHODS
-       //
-
        /**
         * {@inheritDoc}
         */
-       @Override
-       public void markSoneKnown(Sone sone) {
-               newSoneNotification.remove(sone);
+       @Subscribe
+       public void markSoneKnown(MarkSoneKnownEvent markSoneKnownEvent) {
+               newSoneNotification.remove(markSoneKnownEvent.sone());
        }
 
+       //
+       // CORELISTENER METHODS
+       //
+
        /**
         * {@inheritDoc}
         */