mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +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:
parent
72af76ba39
commit
0264b3987c
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue