projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🚧 Filter new posts using the current Sone
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
notification
/
MarkPostKnownDuringFirstStartHandler.kt
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
(file)
--- 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
*
* 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.core.event.*
import net.pterodactylus.sone.data.*
import net.pterodactylus.sone.notify.*
+import net.pterodactylus.sone.utils.*
import net.pterodactylus.util.notify.*
import net.pterodactylus.util.notify.*
+import java.util.function.*
import javax.inject.*
/**
import javax.inject.*
/**
@@
-29,7
+31,7
@@
import javax.inject.*
* the [notification manager][NotificationManager] shows a [first start notification]
* [NotificationManager.hasFirstStartNotification].
*/
* 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<Post>
) {
@Subscribe
fun newPostFound(newPostFoundEvent: NewPostFoundEvent) {
@Subscribe
fun newPostFound(newPostFoundEvent: NewPostFoundEvent) {