mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 21:33:59 +00:00
[ios] refactor search - use SearchQuery class instead of text+locale+isCategory
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
09171651ff
commit
96c24cf973
@@ -104,19 +104,19 @@ NSString *const kMapToCategorySelectorSegue = @"MapToCategorySelectorSegue";
|
||||
|
||||
#pragma mark - MWMPlacePageViewManager
|
||||
|
||||
- (void)searchTextOnMap:(NSString *)text forInputLocale:(NSString *)locale {
|
||||
if (![self searchText:text forInputLocale:locale])
|
||||
- (void)searchOnMap:(SearchQuery *)query {
|
||||
if (![self search:query])
|
||||
return;
|
||||
|
||||
[self.searchManager startSearchingWithIsRouting:NO];
|
||||
}
|
||||
|
||||
- (BOOL)searchText:(NSString *)text forInputLocale:(NSString *)locale {
|
||||
if (text.length == 0)
|
||||
- (BOOL)search:(SearchQuery *)query {
|
||||
if (query.text.length == 0)
|
||||
return NO;
|
||||
|
||||
[self.searchManager startSearchingWithIsRouting:NO];
|
||||
[self.searchManager searchText:text locale:locale isCategory:NO];
|
||||
[self.searchManager searchText:query];
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user