projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
♻️ Extract new-version notification handler
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
notification
/
NewVersionHandler.kt
diff --git
a/src/main/kotlin/net/pterodactylus/sone/web/notification/NewVersionHandler.kt
b/src/main/kotlin/net/pterodactylus/sone/web/notification/NewVersionHandler.kt
index
da6375e
..
95ef0ef
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/web/notification/NewVersionHandler.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/web/notification/NewVersionHandler.kt
@@
-20,11
+20,12
@@
package net.pterodactylus.sone.web.notification
import com.google.common.eventbus.*
import net.pterodactylus.sone.core.event.*
import net.pterodactylus.util.notify.*
import com.google.common.eventbus.*
import net.pterodactylus.sone.core.event.*
import net.pterodactylus.util.notify.*
+import javax.inject.*
/**
* Handler for the “new version” notification.
*/
/**
* Handler for the “new version” notification.
*/
-class NewVersionHandler
(private val notificationManager: NotificationManager,
private val notification: TemplateNotification) {
+class NewVersionHandler
@Inject constructor(private val notificationManager: NotificationManager, @Named("newVersion")
private val notification: TemplateNotification) {
@Subscribe
fun newVersionFound(updateFoundEvent: UpdateFoundEvent) {
@Subscribe
fun newVersionFound(updateFoundEvent: UpdateFoundEvent) {