From 7b1a3e4378a632ad4b9e32373921cfad4fd91e8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 27 Jan 2012 10:17:51 +0100 Subject: [PATCH] Try to prevent new elements from being stuck in the notifications. --- src/main/java/net/pterodactylus/sone/core/Core.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index c58a508..7a97842 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1707,8 +1707,8 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis */ public void markPostKnown(Post post) { synchronized (newPosts) { - if (newPosts.remove(post.getId())) { - knownPosts.add(post.getId()); + newPosts.remove(post.getId()); + if (knownPosts.add(post.getId())) { coreListenerManager.fireMarkPostKnown(post); touchConfiguration(); } @@ -1847,8 +1847,8 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis */ public void markReplyKnown(PostReply reply) { synchronized (newReplies) { - if (newReplies.remove(reply.getId())) { - knownReplies.add(reply.getId()); + newReplies.remove(reply.getId()); + if (knownReplies.add(reply.getId())) { coreListenerManager.fireMarkReplyKnown(reply); touchConfiguration(); } -- 2.7.4