♻️ Move removal of remote posts to handler
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / notification / NewRemotePostHandler.kt
index 0c2368a..6efff85 100644 (file)
@@ -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)
+       }
+
 }