projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
♻️ Move removal of remote posts to handler
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
notification
/
NewRemotePostHandler.kt
diff --git
a/src/main/kotlin/net/pterodactylus/sone/web/notification/NewRemotePostHandler.kt
b/src/main/kotlin/net/pterodactylus/sone/web/notification/NewRemotePostHandler.kt
index
0c2368a
..
6efff85
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/web/notification/NewRemotePostHandler.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/web/notification/NewRemotePostHandler.kt
@@
-40,4
+40,14
@@
class NewRemotePostHandler @Inject constructor(private val notificationManager:
}
}
+ @Subscribe
+ fun postRemoved(event: PostRemovedEvent) {
+ notification.remove(event.post)
+ }
+
+ @Subscribe
+ fun postMarkedKnown(event: MarkPostKnownEvent) {
+ notification.remove(event.post)
+ }
+
}