mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 04:24:29 +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
@@ -193,10 +193,11 @@ BOOL defaultOrientation(CGSize const &size) {
|
||||
|
||||
- (IBAction)searchButtonTouchUpInside:(MWMButton *)sender {
|
||||
auto const body = ^(NavigationSearchState state) {
|
||||
NSString *query = [kSearchButtonRequest.at(state) stringByAppendingString:@" "];
|
||||
NSString *locale = [[AppInfo sharedInfo] languageId];
|
||||
NSString * text = [kSearchButtonRequest.at(state) stringByAppendingString:@" "];
|
||||
NSString * locale = [[AppInfo sharedInfo] languageId];
|
||||
// Category request from navigation search wheel.
|
||||
[MWMSearch searchQuery:query forInputLocale:locale withCategory:YES];
|
||||
SearchQuery * query = [[SearchQuery alloc] init:text locale:locale source:SearchTextSourceCategory];
|
||||
[MWMSearch searchQuery:query];
|
||||
[self setSearchState:state animated:YES];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user