X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FMarkPostKnownDuringFirstStartHandler.kt;h=57962c264153cd17b72cedcb4a38f6fd2e68bbff;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hp=69144e32e4f0dfcbb3f2282723ca2dc71c1dccf1;hpb=a18265d8c510242e99d50f3df505fd5600c2b613;p=Sone.git diff --git a/src/main/kotlin/net/pterodactylus/sone/web/notification/MarkPostKnownDuringFirstStartHandler.kt b/src/main/kotlin/net/pterodactylus/sone/web/notification/MarkPostKnownDuringFirstStartHandler.kt index 69144e3..57962c2 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/notification/MarkPostKnownDuringFirstStartHandler.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/notification/MarkPostKnownDuringFirstStartHandler.kt @@ -1,5 +1,5 @@ /** - * Sone - MarkPostKnownDuringFirstStartHandler.kt - Copyright © 2019 David ‘Bombe’ Roden + * Sone - MarkPostKnownDuringFirstStartHandler.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 @@ -21,7 +21,9 @@ import com.google.common.eventbus.* import net.pterodactylus.sone.core.event.* import net.pterodactylus.sone.data.* import net.pterodactylus.sone.notify.* +import net.pterodactylus.sone.utils.* import net.pterodactylus.util.notify.* +import java.util.function.* import javax.inject.* /** @@ -29,7 +31,7 @@ import javax.inject.* * the [notification manager][NotificationManager] shows a [first start notification] * [NotificationManager.hasFirstStartNotification]. */ -class MarkPostKnownDuringFirstStartHandler(private val notificationManager: NotificationManager, private val markPostAsKnown: (Post) -> Unit) { +class MarkPostKnownDuringFirstStartHandler @Inject constructor(private val notificationManager: NotificationManager, private val markPostAsKnown: Consumer) { @Subscribe fun newPostFound(newPostFoundEvent: NewPostFoundEvent) {