Fire events when new posts and replies are found.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 14 Nov 2010 20:29:42 +0000 (21:29 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 14 Nov 2010 20:29:42 +0000 (21:29 +0100)
src/main/java/net/pterodactylus/sone/core/Core.java

index 7872c94..67c16a6 100644 (file)
@@ -734,6 +734,7 @@ public class Core implements IdentityListener {
                                        for (Post post : sone.getPosts()) {
                                                if (!storedSone.getPosts().contains(post) && !knownPosts.contains(post.getId())) {
                                                        newPosts.add(post.getId());
+                                                       coreListenerManager.fireNewPostFound(post);
                                                }
                                                posts.put(post.getId(), post);
                                        }
@@ -747,6 +748,7 @@ public class Core implements IdentityListener {
                                        for (Reply reply : sone.getReplies()) {
                                                if (!storedSone.getReplies().contains(reply) && !knownReplies.contains(reply.getId())) {
                                                        newReplies.add(reply.getId());
+                                                       coreListenerManager.fireNewReplyFound(reply);
                                                }
                                                replies.put(reply.getId(), reply);
                                        }