Public rooms search: Do a AND search on public rooms

This commit is contained in:
manuroe
2015-12-21 16:41:41 +01:00
parent 94fbcc076f
commit d65efac3d5
3 changed files with 14 additions and 5 deletions
+4 -1
View File
@@ -490,10 +490,13 @@
{
self.selectedViewController.view.hidden = NO;
// Do a AND search on words separated by a space
NSArray *patterns = [searchBar.text componentsSeparatedByString:@" "];
// Forward the search request to the data source
if (self.selectedViewController == recentsViewController)
{
[recentsDataSource searchWithPatterns:@[searchBar.text]];
[recentsDataSource searchWithPatterns:patterns];
recentsViewController.shouldScrollToTopOnRefresh = YES;
}
}