X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FSoneLockedHandler.kt;h=583601b466ed9632a86e8b739e8e0d7c1f4dc42a;hp=8bfbda43b96db59d0fd9f47637d82f831ee6604e;hb=6d770b3aa761b4432517b4789a980c4ba75ed9fa;hpb=099242dcaceac5f53c142e400c81dd3cf0814bc6 diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/SoneLockedHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/SoneLockedHandler.kt index 8bfbda4..583601b 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/SoneLockedHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/SoneLockedHandler.kt @@ -24,12 +24,16 @@ import net.pterodactylus.sone.notify.* import net.pterodactylus.util.notify.* import java.util.concurrent.* import java.util.concurrent.atomic.* +import javax.inject.* /** * Handler for [SoneLockedEvent]s and [SoneUnlockedEvent]s that can schedule notifications after * a certain timeout. */ -class SoneLockedHandler(private val notificationManager: NotificationManager, private val notification: ListNotification, private val executor: ScheduledExecutorService) { +class SoneLockedHandler @Inject constructor( + private val notificationManager: NotificationManager, + @Named("soneLocked") private val notification: ListNotification, + private val executor: ScheduledExecutorService) { private val future: AtomicReference> = AtomicReference()