Mark posts and replies as known when they are removed.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 6 Dec 2010 04:55:52 +0000 (05:55 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 6 Dec 2010 04:55:52 +0000 (05:55 +0100)
src/main/java/net/pterodactylus/sone/core/Core.java

index 52ebfab..5d176ce 100644 (file)
@@ -885,6 +885,9 @@ public class Core implements IdentityListener {
                                if (!soneRescueMode) {
                                        for (Post post : storedSone.getPosts()) {
                                                posts.remove(post.getId());
+                                               if (!sone.getPosts().contains(post)) {
+                                                       markPostKnown(post);
+                                               }
                                        }
                                }
                                synchronized (newPosts) {
@@ -902,6 +905,9 @@ public class Core implements IdentityListener {
                                if (!soneRescueMode) {
                                        for (Reply reply : storedSone.getReplies()) {
                                                replies.remove(reply.getId());
+                                               if (!sone.getReplies().contains(reply)) {
+                                                       markReplyKnown(reply);
+                                               }
                                        }
                                }
                                synchronized (newReplies) {