[iOS] Fallback to old search in navigation

https://jira.mail.ru/browse/MAPSME-14174
This commit is contained in:
Alexander Boriskov 2020-06-24 10:00:29 +03:00 committed by Aleksey Belousov
parent ee133396e2
commit 419da3bf59

View file

@ -214,8 +214,13 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing";
[self hidePlacePage];
BOOL const isSearchResult = [MWMSearchManager manager].state == MWMSearchManagerStateResult;
BOOL const isNavigationDashboardHidden = [MWMNavigationDashboardManager sharedManager].state == MWMNavigationDashboardStateHidden;
if (isSearchResult) {
[MWMSearchManager manager].state = MWMSearchManagerStateMapSearch;
if (isNavigationDashboardHidden) {
[MWMSearchManager manager].state = MWMSearchManagerStateMapSearch;
} else {
[MWMSearchManager manager].state = MWMSearchManagerStateHidden;
}
}
if (!switchFullScreenMode)
@ -225,7 +230,6 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing";
return;
BOOL const isSearchHidden = [MWMSearchManager manager].state == MWMSearchManagerStateHidden;
BOOL const isNavigationDashboardHidden = [MWMNavigationDashboardManager sharedManager].state == MWMNavigationDashboardStateHidden;
if (isSearchHidden && isNavigationDashboardHidden) {
self.controlsManager.hidden = !self.controlsManager.hidden;
}