Mark deleted posts and replies as known.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Apr 2011 05:11:32 +0000 (07:11 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Apr 2011 05:11:32 +0000 (07:11 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index 93caddd..75b108b 100644 (file)
@@ -1493,6 +1493,10 @@ public class Core implements IdentityListener, UpdateListener {
                synchronized (posts) {
                        posts.remove(post.getId());
                }
+               synchronized (newPosts) {
+                       markPostKnown(post);
+                       knownPosts.remove(post.getId());
+               }
                saveSone(post.getSone());
        }
 
@@ -1618,6 +1622,10 @@ public class Core implements IdentityListener, UpdateListener {
                synchronized (replies) {
                        replies.remove(reply.getId());
                }
+               synchronized (newReplies) {
+                       markReplyKnown(reply);
+                       knownReplies.remove(reply.getId());
+               }
                sone.removeReply(reply);
                saveSone(sone);
        }