diff options
author | Yana Stamcheva <yana@jitsi.org> | 2011-12-28 16:14:38 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2011-12-28 16:14:38 +0000 |
commit | 969ddcc27051af25fcde70d7f24a71cd342c6961 (patch) | |
tree | 58ceb1da683bd9bc3074cdaffc602430d5380497 /src/net/java/sip/communicator/impl/contactlist | |
parent | 8e688ab5cba90d5f824ad371210dd250242fb885 (diff) | |
download | jitsi-969ddcc27051af25fcde70d7f24a71cd342c6961.zip jitsi-969ddcc27051af25fcde70d7f24a71cd342c6961.tar.gz jitsi-969ddcc27051af25fcde70d7f24a71cd342c6961.tar.bz2 |
Removes non persistent groups from "Add contact" window and "Move to group" menu.
Diffstat (limited to 'src/net/java/sip/communicator/impl/contactlist')
-rw-r--r-- | src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java b/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java index af3c775..9c4dd06 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java +++ b/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java @@ -1042,6 +1042,26 @@ public class MetaContactGroupImpl } /** + * Determines whether or not this meta group contains only groups that are + * being stored by a server. + * + * @return true if the meta group is persistent and false otherwise. + */ + public boolean isPersistent() + { + Iterator<ContactGroup> contactGroupsIter = getContactGroups(); + + while (contactGroupsIter.hasNext()) + { + ContactGroup contactGroup = contactGroupsIter.next(); + if (contactGroup.isPersistent()) + return true; + } + + return false; + } + + /** * Determines the index in <code>#data</code> of a specific key. * * @param key |