/**
- * Sone - StartupHandler.kt - Copyright © 2019 David ‘Bombe’ Roden
+ * Sone - StartupHandler.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
import net.pterodactylus.util.notify.*
import java.util.concurrent.*
import java.util.concurrent.TimeUnit.*
+import javax.inject.*
/**
* Handler for the [Startup] event notification.
*/
-class StartupHandler(private val notificationManager: NotificationManager, private val notification: TemplateNotification, val ticker: ScheduledExecutorService) {
+class StartupHandler @Inject constructor(
+ private val notificationManager: NotificationManager,
+ @Named("startup") private val notification: TemplateNotification,
+ @Named("notification") private val ticker: ScheduledExecutorService) {
@Subscribe
- fun startup(startup: Startup) {
+ fun startup(@Suppress("UNUSED_PARAMETER") startup: Startup) {
notificationManager.addNotification(notification)
ticker.schedule({ notificationManager.removeNotification(notification) }, 2, MINUTES)
}