X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FFirstStartHandler.kt;h=3dc86899ac14ea9b474fc6b37d6a8fc10f25f8c3;hp=c69884623b5ccce47554f3a87447b7b0eb6be585;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=1b4f8c0f65eb4db3831585743b326d2588b36cef diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/FirstStartHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/FirstStartHandler.kt index c698846..3dc8689 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/FirstStartHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/FirstStartHandler.kt @@ -1,5 +1,5 @@ /** - * Sone - FirstStartHandler.kt - Copyright © 2019 David ‘Bombe’ Roden + * Sone - FirstStartHandler.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.* /** * Handles the notification shown on first start of Sone. */ -class FirstStartHandler(private val notificationManager: NotificationManager, private val notification: TemplateNotification) { +class FirstStartHandler @Inject constructor(private val notificationManager: NotificationManager, @Named("firstStart") private val notification: TemplateNotification) { @Subscribe - fun firstStart(firstStart: FirstStart) { + fun firstStart(@Suppress("UNUSED_PARAMETER") firstStart: FirstStart) { notificationManager.addNotification(notification) }