projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
♻️ Turn new elements properties into methods
[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
..
91eaae0
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/web/notification/NewRemotePostHandler.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/web/notification/NewRemotePostHandler.kt
@@
-1,5
+1,5
@@
/**
/**
- * Sone - NewRemotePostHandler.kt - Copyright © 2019 David ‘Bombe’ Roden
+ * Sone - NewRemotePostHandler.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
@@
-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)
+ }
+
}
}