X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FNewSoneHandler.kt;h=eb384c7cb104ebf1d8874bf2e611236ce06a09de;hp=89150cc4aac57f060850afa7d3287a294ff734b8;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=2ffc429995f67d23ac3e36007044cf23ca1390de diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/NewSoneHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/NewSoneHandler.kt index 89150cc..eb384c7 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/NewSoneHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/NewSoneHandler.kt @@ -1,5 +1,5 @@ /** - * Sone - NewSoneHandler.kt - Copyright © 2019 David ‘Bombe’ Roden + * Sone - NewSoneHandler.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 @@ -22,14 +22,12 @@ import net.pterodactylus.sone.core.event.* import net.pterodactylus.sone.data.* import net.pterodactylus.sone.notify.* import net.pterodactylus.util.notify.* -import net.pterodactylus.util.template.* +import javax.inject.* /** * Notification handler for “new Sone discovered” events. */ -class NewSoneHandler(private val notificationManager: NotificationManager, template: Template) { - - private val notification = ListNotification("new-sone-notification", "sones", template, dismissable = false) +class NewSoneHandler @Inject constructor(private val notificationManager: NotificationManager, @Named("newSone") private val notification: ListNotification) { @Subscribe fun newSoneFound(newSoneFoundEvent: NewSoneFoundEvent) {