import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.core.CoreListener;
import net.pterodactylus.sone.core.event.ImageInsertAbortedEvent;
+import net.pterodactylus.sone.core.event.ImageInsertFinishedEvent;
import net.pterodactylus.sone.core.event.ImageInsertStartedEvent;
import net.pterodactylus.sone.core.event.MarkPostKnownEvent;
import net.pterodactylus.sone.core.event.MarkPostReplyKnownEvent;
insertingImagesNotification.remove(imageInsertAbortedEvent.image());
}
- //
- // CORELISTENER METHODS
- //
-
/**
- * {@inheritDoc}
+ * Notifies the web interface that an {@link Image} insert is finished.
+ *
+ * @param imageInsertFinishedEvent
+ * The event
*/
- @Override
- public void imageInsertFinished(Image image) {
- insertingImagesNotification.remove(image);
- insertedImagesNotification.add(image);
+ @Subscribe
+ public void imageInsertFinished(ImageInsertFinishedEvent imageInsertFinishedEvent) {
+ insertingImagesNotification.remove(imageInsertFinishedEvent.image());
+ insertedImagesNotification.add(imageInsertFinishedEvent.image());
notificationManager.addNotification(insertedImagesNotification);
}
+ //
+ // CORELISTENER METHODS
+ //
+
/**
* {@inheritDoc}
*/