Fixes matching in contact list instances where no filter strings is set.

fix-message-formatting 5205
Damian Minkov 12 years ago
parent 3db6870967
commit 816529a9ae

@ -279,10 +279,14 @@ public void setFilterString(String filter)
*/
private boolean isMatching(String text)
{
return (filterPattern != null
&& filterPattern.matcher(text).find())
|| (isSearchingPhoneNumber
&& GuiActivator.getPhoneNumberI18nService()
.phoneNumbersMatch(this.filterString, text));
if (filterPattern != null)
return filterPattern.matcher(text).find();
if(isSearchingPhoneNumber && this.filterString != null)
return GuiActivator.getPhoneNumberI18nService()
.phoneNumbersMatch(this.filterString, text);
return true;
}
}

@ -56,7 +56,6 @@ public class ServerChatRoomQuery
* @param contactSource the parent contact source
* @param queryString the query string to match
* @param provider the provider associated with the query
* @param count the maximum result contact count
*/
public ServerChatRoomQuery(String queryString,
ServerChatRoomContactSourceService contactSource,
@ -131,7 +130,6 @@ private void providerAdded(ChatRoomProviderWrapper provider,
* @param chatRoomID the id of the chat room.
* @param addQueryResult indicates whether we should add the chat room to
* the query results or fire an event without adding it to the results.
* @param isAutoJoin the auto join state of the contact.
*/
private void addChatRoom(ProtocolProviderService pps,
String chatRoomName, String chatRoomID, boolean addQueryResult)

Loading…
Cancel
Save