/**
- * Sone - WebOfTrustHandler.kt - Copyright © 2019 David ‘Bombe’ Roden
+ * Sone - WebOfTrustHandler.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 com.google.common.eventbus.*
import net.pterodactylus.sone.core.event.*
import net.pterodactylus.util.notify.*
+import javax.inject.*
/**
* Handler for web of trust-related notifications and the [WebOfTrustAppeared]
* and [WebOfTrustDisappeared] events.
*/
-class WebOfTrustHandler(private val notificationManager: NotificationManager, private val notification: TemplateNotification) {
+class WebOfTrustHandler @Inject constructor(private val notificationManager: NotificationManager, @Named("webOfTrust") private val notification: TemplateNotification) {
@Subscribe
- fun webOfTrustAppeared(webOfTrustAppeared: WebOfTrustAppeared) {
+ fun webOfTrustAppeared(@Suppress("UNUSED_PARAMETER") webOfTrustAppeared: WebOfTrustAppeared) {
notificationManager.removeNotification(notification)
}
@Subscribe
- fun webOfTrustDisappeared(webOfTrustDisappeared: WebOfTrustDisappeared) {
+ fun webOfTrustDisappeared(@Suppress("UNUSED_PARAMETER") webOfTrustDisappeared: WebOfTrustDisappeared) {
notificationManager.addNotification(notification)
}