1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-23 02:58:00 +01:00

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
This commit is contained in:
Gaston Dombiak 2004-01-18 13:04:49 +00:00 committed by gdombiak
parent 72af76ba39
commit 0264b3987c

View file

@ -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);
}
}
}