Convert “image is inserted” into EventBus-based event.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / WebInterface.java
index dc4c4f0..a30508e 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.ImageInsertStartedEvent;
 import net.pterodactylus.sone.core.event.MarkPostKnownEvent;
 import net.pterodactylus.sone.core.event.MarkPostReplyKnownEvent;
 import net.pterodactylus.sone.core.event.MarkSoneKnownEvent;
@@ -1036,19 +1037,22 @@ public class WebInterface implements CoreListener {
                notificationManager.addNotification(newVersionNotification);
        }
 
-       //
-       // CORELISTENER METHODS
-       //
-
        /**
-        * {@inheritDoc}
+        * Notifies the web interface that an image insert was started
+        *
+        * @param imageInsertStartedEvent
+        *            The event
         */
-       @Override
-       public void imageInsertStarted(Image image) {
-               insertingImagesNotification.add(image);
+       @Subscribe
+       public void imageInsertStarted(ImageInsertStartedEvent imageInsertStartedEvent) {
+               insertingImagesNotification.add(imageInsertStartedEvent.image());
                notificationManager.addNotification(insertingImagesNotification);
        }
 
+       //
+       // CORELISTENER METHODS
+       //
+
        /**
         * {@inheritDoc}
         */