1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-10-31 17:25:58 +01:00

SMACK-312 Fire roster listener also when the group name changed

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@12087 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Holger Bergunde 2011-03-10 11:30:53 +00:00 committed by holger.bergunde
parent 5a544a50e3
commit 4ada4978d8

View file

@ -854,9 +854,11 @@ public class Roster {
// If the entry was in then list then update its state with the new values
RosterEntry oldEntry = entries.put(item.getUser(), entry);
// Keep note that an entry has been updated but only if it's different
if (oldEntry == null || !oldEntry.equalsDeep(entry)) {
updatedEntries.add(item.getUser());
RosterPacket.Item oldItem = RosterEntry.toRosterItem(oldEntry);
//We have also to check if only the group names have changed from the item
if (oldEntry == null || !oldEntry.equalsDeep(entry) || !item.getGroupNames().equals(oldItem.getGroupNames()))
{
updatedEntries.add(item.getUser());
}
}
// If the roster entry belongs to any groups, remove it from the