📄 Update year in file headers
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / notification / NewRemotePostHandler.kt
index 0c2368a..91eaae0 100644 (file)
@@ -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
@@ -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)
+       }
+
 }