forked from organicmaps/organicmaps
[ios] Fixed restoring of the last search scope on view opening
This commit is contained in:
parent
9d31759152
commit
3f85ba5afb
1 changed files with 8 additions and 9 deletions
|
@ -105,14 +105,7 @@ static void OnSearchResultCallback(search::Result const & res, int queryId)
|
|||
[m_locationManager startUpdatingLocation];
|
||||
if ([CLLocationManager headingAvailable])
|
||||
[m_locationManager startUpdatingHeading];
|
||||
|
||||
// load previously saved search mode
|
||||
string searchMode;
|
||||
if (!Settings::Get(SEARCH_MODE_SETTING, searchMode))
|
||||
searchMode = SEARCH_MODE_DEFAULT;
|
||||
[self setSearchMode:searchMode];
|
||||
}
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -153,7 +146,13 @@ static void OnSearchResultCallback(search::Result const & res, int queryId)
|
|||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
{
|
||||
// load previously saved search mode
|
||||
string searchMode;
|
||||
if (!Settings::Get(SEARCH_MODE_SETTING, searchMode))
|
||||
searchMode = SEARCH_MODE_DEFAULT;
|
||||
[self setSearchMode:searchMode];
|
||||
|
||||
[self fixHeadingOrientation];
|
||||
// show keyboard
|
||||
[m_searchBar becomeFirstResponder];
|
||||
|
|
Loading…
Add table
Reference in a new issue