aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2012-02-09 15:43:05 +0000
committerDamian Minkov <damencho@jitsi.org>2012-02-09 15:43:05 +0000
commit67e3c21c1fe1f33cd64cb62127aa20bfe14294d3 (patch)
tree04266ea272dcb683748e62cea747e93f795219ba /src/net/java/sip/communicator/impl
parent84249edc0ee7d07ffc5956a7ada477151f963b48 (diff)
downloadjitsi-67e3c21c1fe1f33cd64cb62127aa20bfe14294d3.zip
jitsi-67e3c21c1fe1f33cd64cb62127aa20bfe14294d3.tar.gz
jitsi-67e3c21c1fe1f33cd64cb62127aa20bfe14294d3.tar.bz2
Fixes a problem where a group can be shown twice in the contactlist.
Diffstat (limited to 'src/net/java/sip/communicator/impl')
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/PresenceFilter.java14
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java15
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactListSource.java13
3 files changed, 30 insertions, 12 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/PresenceFilter.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/PresenceFilter.java
index 45118de..76abdc9 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/PresenceFilter.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/PresenceFilter.java
@@ -245,8 +245,18 @@ public class PresenceFilter
if (isMatching(subgroup))
{
- GuiActivator.getContactList().addGroup(
- MetaContactListSource.createUIGroup(subgroup), true);
+ UIGroup uiGroup;
+ synchronized(subgroup)
+ {
+ uiGroup = MetaContactListSource
+ .getUIGroup(subgroup);
+
+ if (uiGroup == null)
+ uiGroup = MetaContactListSource
+ .createUIGroup(subgroup);
+ }
+
+ GuiActivator.getContactList().addGroup(uiGroup, true);
addMatching(subgroup, query, resultCount);
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java
index e238658..bc8ad23 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java
@@ -567,12 +567,17 @@ public class TreeContactList
return;
}
- GroupNode parentNode = treeModel.getRoot();
+ GroupNode groupNode = group.getGroupNode();
+
+ if(groupNode == null)
+ {
+ GroupNode parentNode = treeModel.getRoot();
- if (isSorted)
- parentNode.sortedAddContactGroup(group);
- else
- parentNode.addContactGroup(group);
+ if (isSorted)
+ parentNode.sortedAddContactGroup(group);
+ else
+ parentNode.addContactGroup(group);
+ }
expandGroup(treeModel.getRoot());
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactListSource.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactListSource.java
index c631573..fd7cd84 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactListSource.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaContactListSource.java
@@ -762,12 +762,15 @@ public class MetaContactListSource
if (!MetaContactListSource
.isRootGroup(parentGroup))
{
- uiGroup = MetaContactListSource
- .getUIGroup(parentGroup);
-
- if (uiGroup == null)
+ synchronized(parentGroup)
+ {
uiGroup = MetaContactListSource
- .createUIGroup(parentGroup);
+ .getUIGroup(parentGroup);
+
+ if (uiGroup == null)
+ uiGroup = MetaContactListSource
+ .createUIGroup(parentGroup);
+ }
}
GuiActivator.getContactList()