X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FNotificationHandler.kt;h=74e5337739c7940311019da4061b2d69c44971ee;hb=bfa49c59a39fddd8bed21bdac98d8bd21e8cb525;hp=7f81f9a74fdbac99fadebf783e8c40d51d27576c;hpb=c2749a08af5f846c7285c0bb6a930f372bd7f9cb;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/NotificationHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/NotificationHandler.kt index 7f81f9a..74e5337 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/NotificationHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/NotificationHandler.kt @@ -17,20 +17,17 @@ package net.pterodactylus.sone.web.notification -import com.google.common.eventbus.* -import net.pterodactylus.sone.main.* -import net.pterodactylus.util.notify.* import javax.inject.* /** - * Handler for notifications that can create notifications and register them with an event bus. + * Container that causes notification handlers to be created and (more importantly) registered + * on creation with the event bus. */ -@Suppress("UnstableApiUsage") -class NotificationHandler @Inject constructor(private val eventBus: EventBus, private val loaders: Loaders, private val notificationManager: NotificationManager) { - - fun start() { - SoneLockedOnStartupHandler(notificationManager, loaders.loadTemplate("/templates/notify/soneLockedOnStartupNotification.html")) - .also(eventBus::register) - } - -} +@Suppress("unused") +class NotificationHandler @Inject constructor( + val markPostKnownDuringFirstStartHandler: MarkPostKnownDuringFirstStartHandler, + val newSoneHandler: NewSoneHandler, + val newRemotePostHandler: NewRemotePostHandler, + val soneLockedOnStartupHandler: SoneLockedOnStartupHandler, + val soneLockedHandler: SoneLockedHandler +)