From 4ada4978d8927c1834a6aacae8a59ae2f3bf398d Mon Sep 17 00:00:00 2001 From: Holger Bergunde Date: Thu, 10 Mar 2011 11:30:53 +0000 Subject: [PATCH] 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 --- source/org/jivesoftware/smack/Roster.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/org/jivesoftware/smack/Roster.java b/source/org/jivesoftware/smack/Roster.java index df5d53d9b..93f3ccf96 100644 --- a/source/org/jivesoftware/smack/Roster.java +++ b/source/org/jivesoftware/smack/Roster.java @@ -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