/** The Sone downloader. */
private final SoneDownloader soneDownloader;
+ /** Whether the core has been stopped. */
+ private volatile boolean stopped;
+
/** The Sones’ statuses. */
/* synchronize access on itself. */
private final Map<Sone, SoneStatus> soneStatuses = new HashMap<Sone, SoneStatus>();
}
synchronized (newPosts) {
for (Post post : sone.getPosts()) {
- if (!storedSone.getPosts().contains(post) && !knownSones.contains(post.getId())) {
+ if (!storedSone.getPosts().contains(post) && !knownPosts.contains(post.getId())) {
newPosts.add(post.getId());
+ coreListenerManager.fireNewPostFound(post);
}
posts.put(post.getId(), post);
}
}
synchronized (newReplies) {
for (Reply reply : sone.getReplies()) {
- if (!storedSone.getReplies().contains(reply) && !knownSones.contains(reply.getId())) {
+ if (!storedSone.getReplies().contains(reply) && !knownReplies.contains(reply.getId())) {
newReplies.add(reply.getId());
+ coreListenerManager.fireNewReplyFound(reply);
}
replies.put(reply.getId(), reply);
}
}
}
saveConfiguration();
+ stopped = true;
}
//