import net.pterodactylus.sone.freenet.wot.Identity;
import net.pterodactylus.sone.main.SonePlugin;
import net.pterodactylus.sone.notify.NewPostNotification;
+import net.pterodactylus.sone.notify.NewReplyNotification;
import net.pterodactylus.sone.notify.NewSoneNotification;
import net.pterodactylus.sone.template.CollectionAccessor;
import net.pterodactylus.sone.template.CssClassNameFilter;
/** The “new post” notification. */
private final NewPostNotification newPostNotification;
+ /** The “new reply” notification. */
+ private final NewReplyNotification newReplyNotification;
+
/**
* Creates a new web interface.
*
Template newPostNotificationTemplate = templateFactory.createTemplate(createReader("/templates/notify/newPostNotification.html"));
newPostNotification = new NewPostNotification(newPostNotificationTemplate);
+
+ Template newReplyNotificationTemplate = templateFactory.createTemplate(createReader("/templates/notify/newReplyNotification.html"));
+ newReplyNotification = new NewReplyNotification(newReplyNotificationTemplate);
}
//
*/
@Override
public void newReplyFound(Reply reply) {
- /* TODO */
+ newReplyNotification.addReply(reply);
+ notificationManager.addNotification(newReplyNotification);
}
/**
*/
@Override
public void markReplyKnown(Reply reply) {
- /* TODO */
+ newReplyNotification.removeReply(reply);
+ if (newReplyNotification.isEmpty()) {
+ newReplyNotification.dismiss();
+ }
}
/**