📄 Update year in file headers
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / notification / NotificationHandler.kt
index 7f81f9a..a24a6d8 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Sone - NotificationHandler.kt - Copyright Â© 2019 David â€˜Bombe’ Roden
+ * Sone - NotificationHandler.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
 
 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,
+               markPostReplyKnownDuringFirstStartHandler: MarkPostReplyKnownDuringFirstStartHandler,
+               newSoneHandler: NewSoneHandler,
+               newRemotePostHandler: NewRemotePostHandler,
+               remotePostReplyHandler: RemotePostReplyHandler,
+               soneLockedOnStartupHandler: SoneLockedOnStartupHandler,
+               soneLockedHandler: SoneLockedHandler,
+               localPostHandler: LocalPostHandler,
+               localReplyHandler: LocalReplyHandler,
+               newVersionHandler: NewVersionHandler,
+               imageInsertHandler: ImageInsertHandler,
+               firstStartHandler: FirstStartHandler,
+               configNotReadHandler: ConfigNotReadHandler,
+               startupHandler: StartupHandler,
+               webOfTrustPinger: WebOfTrustPinger,
+               webOfTrustHandler: WebOfTrustHandler,
+               soneMentionDetector: SoneMentionDetector,
+               soneMentionedHandler: SoneMentionedHandler,
+               soneInsertHandler: SoneInsertHandler
+)