X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FImageInsertHandler.kt;h=bab759913d14200be42150546336a181124aaf15;hb=HEAD;hp=ea11481c168c3dbc36a12b7847060c1b1d8b82c8;hpb=060f9d859329fd070a625adc5e70dee4c811d2e6;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/ImageInsertHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/ImageInsertHandler.kt index ea11481..bab7599 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/ImageInsertHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/ImageInsertHandler.kt @@ -1,5 +1,5 @@ /** - * Sone - ImageInsertHandler.kt - Copyright © 2019 David ‘Bombe’ Roden + * Sone - ImageInsertHandler.kt - Copyright © 2019–2020 David ‘Bombe’ Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ import net.pterodactylus.sone.core.event.* import net.pterodactylus.sone.data.* import net.pterodactylus.sone.notify.* import net.pterodactylus.util.notify.* +import javax.inject.* /** * Notification handler for the various image-insert-related events. @@ -31,11 +32,11 @@ import net.pterodactylus.util.notify.* * @see ImageInsertFailedEvent * @see ImageInsertFinishedEvent */ -class ImageInsertHandler( +class ImageInsertHandler @Inject constructor( private val notificationManager: NotificationManager, - private val imageInsertingNotification: ListNotification, - private val imageFailedNotification: ListNotification, - private val imageInsertedNotification: ListNotification) { + @Named("imageInserting") private val imageInsertingNotification: ListNotification, + @Named("imageFailed") private val imageFailedNotification: ListNotification, + @Named("imageInserted") private val imageInsertedNotification: ListNotification) { @Subscribe fun imageInsertStarted(imageInsertStartedEvent: ImageInsertStartedEvent) {