*/
class NewSoneHandler(private val notificationManager: NotificationManager, template: Template) {
- private val notification = ListNotification<Sone>("new-sone-notification", "", template)
+ private val notification = ListNotification<Sone>("new-sone-notification", "sones", template, dismissable = false)
@Subscribe
fun newSoneFound(newSoneFoundEvent: NewSoneFoundEvent) {
}
}
+ @Subscribe
+ fun markedSoneKnown(markSoneKnownEvent: MarkSoneKnownEvent) {
+ notification.remove(markSoneKnownEvent.sone)
+ }
+
+ @Subscribe
+ fun soneRemoved(soneRemovedEvent: SoneRemovedEvent) {
+ notification.remove(soneRemovedEvent.sone)
+ }
+
}
private fun NotificationManager.hasNotification(id: String) =