X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FConfigNotReadHandler.kt;h=6092311166056368466ac848086db88c40a89600;hp=e2a1adab6b7fe85ea60e689d08af61760b2c1d77;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=e6aa326d36fc1d653ed5473fd02af8cba8992b9a diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/ConfigNotReadHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/ConfigNotReadHandler.kt index e2a1ada..6092311 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/ConfigNotReadHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/ConfigNotReadHandler.kt @@ -1,5 +1,5 @@ /** - * Sone - ConfigNotReadHandler.kt - Copyright © 2019 David ‘Bombe’ Roden + * Sone - ConfigNotReadHandler.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 @@ -20,14 +20,15 @@ package net.pterodactylus.sone.web.notification import com.google.common.eventbus.* import net.pterodactylus.sone.core.event.* import net.pterodactylus.util.notify.* +import javax.inject.* /** * Handler for [ConfigNotRead] events. */ -class ConfigNotReadHandler(private val notificationManager: NotificationManager, private val notification: TemplateNotification) { +class ConfigNotReadHandler @Inject constructor(private val notificationManager: NotificationManager, @Named("configNotRead") private val notification: TemplateNotification) { @Subscribe - fun configNotRead(configNotRead: ConfigNotRead) { + fun configNotRead(@Suppress("UNUSED_PARAMETER") configNotRead: ConfigNotRead) { notificationManager.addNotification(notification) }