From 0264b3987c79b41dad24ab5e639d76245e0a8117 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Sun, 18 Jan 2004 13:04:49 +0000 Subject: [PATCH] Modifies #removeEntry to remove the entry immediately (locally) git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2210 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/RosterGroup.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/org/jivesoftware/smack/RosterGroup.java b/source/org/jivesoftware/smack/RosterGroup.java index 8e608aa38..cc616b604 100644 --- a/source/org/jivesoftware/smack/RosterGroup.java +++ b/source/org/jivesoftware/smack/RosterGroup.java @@ -225,7 +225,9 @@ public class RosterGroup { */ public void removeEntry(RosterEntry entry) { // Only remove the entry if it's in the entry list. - // The actual removal logic takes place in RosterPacketListenerprocess>>Packet(Packet) + // Remove the entry locally, if we wait for RosterPacketListenerprocess>>Packet(Packet) + // to take place the entry will exist in the group until a packet is received from the + // server. synchronized (entries) { if (entries.contains(entry)) { RosterPacket packet = new RosterPacket(); @@ -234,6 +236,8 @@ public class RosterGroup { item.removeGroupName(this.getName()); packet.addRosterItem(item); connection.sendPacket(packet); + // Remove the entry locally + entries.remove(entry); } } }