X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FNotificationHandler.kt;h=cc2a2b3c71be6216d192e6fddc0455c8e7a39842;hb=60b0b8a4b6954a0137b963397e144fd4ed82e3a8;hp=7f81f9a74fdbac99fadebf783e8c40d51d27576c;hpb=8c387bf3c1315ee19902a8d15616ef394b486ffe;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..cc2a2b3 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,27 @@ package net.pterodactylus.sone.web.notification -import com.google.common.eventbus.* -import net.pterodactylus.sone.main.* -import net.pterodactylus.util.notify.* +import net.pterodactylus.sone.freenet.wot.* +import net.pterodactylus.sone.text.* 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_PARAMETER") +class NotificationHandler @Inject constructor( + markPostKnownDuringFirstStartHandler: MarkPostKnownDuringFirstStartHandler, + newSoneHandler: NewSoneHandler, + newRemotePostHandler: NewRemotePostHandler, + soneLockedOnStartupHandler: SoneLockedOnStartupHandler, + soneLockedHandler: SoneLockedHandler, + newVersionHandler: NewVersionHandler, + imageInsertHandler: ImageInsertHandler, + firstStartHandler: FirstStartHandler, + configNotReadHandler: ConfigNotReadHandler, + startupHandler: StartupHandler, + webOfTrustPinger: WebOfTrustPinger, + webOfTrustHandler: WebOfTrustHandler, + soneMentionDetector: SoneMentionDetector +)