diff options
author | Damian Minkov <damencho@jitsi.org> | 2013-11-19 15:44:48 +0200 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2013-11-19 15:44:48 +0200 |
commit | e32b56e234f6722a9954d1a98e354481b2360ab5 (patch) | |
tree | 95cd27eb317500fca0ce6da6b3957f3830d80d5a /src/net/java/sip/communicator/impl/contactlist | |
parent | b4c97b9c905d6c0685f28441d5546d9d408c9912 (diff) | |
download | jitsi-e32b56e234f6722a9954d1a98e354481b2360ab5.zip jitsi-e32b56e234f6722a9954d1a98e354481b2360ab5.tar.gz jitsi-e32b56e234f6722a9954d1a98e354481b2360ab5.tar.bz2 |
Handles more cases while moving contacts and renaming groups from remote logged in locations.
Diffstat (limited to 'src/net/java/sip/communicator/impl/contactlist')
-rw-r--r-- | src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java b/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java index bbf7545..db44fa1 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java +++ b/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java @@ -2792,7 +2792,6 @@ public class MetaContactListServiceImpl */ public void groupRemoved(ServerStoredGroupEvent evt) { - if (logger.isTraceEnabled()) logger.trace("ContactGroup removed: " + evt); @@ -2810,10 +2809,10 @@ public class MetaContactListServiceImpl removeContactGroupFromMetaContactGroup(metaContactGroup, evt.getSourceGroup(), evt.getSourceProvider()); - //do not remove the meta contact group even if this is the las - //protocol specific contact group. Contrary to contacts, meta - //contact groups are to only be remove upon user indication or - //otherwise it would be difficult for a user to create a new grp. + if(metaContactGroup.countContactGroups() == 0) + { + removeMetaContactGroup(metaContactGroup); + } } /** @@ -2830,6 +2829,14 @@ public class MetaContactListServiceImpl MetaContactGroup metaContactGroup = findMetaContactGroupByContactGroup(evt.getSourceGroup()); + if(metaContactGroup.countContactGroups() == 1) + { + // if the only group contained in this group is renamed + // rename it + ((MetaContactGroupImpl)metaContactGroup) + .setGroupName(evt.getSourceGroup().getGroupName()); + } + fireMetaContactGroupEvent( metaContactGroup , evt.getSourceProvider() |