X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FStartupHandler.kt;h=3776d43ba927681d942ad3fcb80901e9e34bb9ad;hp=c3b69f0b115c9f18b9e329789f55c0d3e0894440;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=5cfe9916e6b52b68a403873e35683ce242be4793 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/StartupHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/StartupHandler.kt index c3b69f0..3776d43 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/StartupHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/StartupHandler.kt @@ -1,5 +1,5 @@ /** - * 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 @@ -30,10 +30,10 @@ import javax.inject.* class StartupHandler @Inject constructor( private val notificationManager: NotificationManager, @Named("startup") private val notification: TemplateNotification, - private val ticker: ScheduledExecutorService) { + @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) }