diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/CallHistoryFilter.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/CallHistoryFilter.java
index 6b33b181c..1fe7332a1 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/CallHistoryFilter.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/CallHistoryFilter.java
@@ -48,10 +48,12 @@ public void applyFilter(FilterQuery filterQuery)
= contactSource.getContactSourceService()
.createContactQuery("", 50);
- filterQuery.addContactQuery(query);
-
query.start();
+
+ filterQuery.addContactQuery(query);
+ addMatching(query.getQueryResults(), contactSource);
+
// We know that this query should be finished here and we do not
// expect any further results from it.
filterQuery.removeQuery(query);
@@ -123,4 +125,26 @@ private void addMatching(NotificationContactSource notifSource)
}
}
}
+
+ /**
+ * Adds matching sourceContacts to the result tree model.
+ *
+ * @param sourceContacts the list of SourceContacts to add
+ * @param uiSource the ExternalContactSource, which contacts
+ * we're adding
+ */
+ private void addMatching( List sourceContacts,
+ UIContactSource uiSource)
+ {
+ Iterator contactsIter = sourceContacts.iterator();
+
+ while (contactsIter.hasNext())
+ {
+ GuiActivator.getContactList().addContact(
+ uiSource.createUIContact(contactsIter.next()),
+ uiSource.getUIGroup(),
+ false,
+ true);
+ }
+ }
}