[andrid] Implemented hidding the rooms picker on hardware back press

This commit is contained in:
alexzatsepin 2020-08-19 15:14:44 +03:00 committed by Tatiana Yan
parent 61396975a2
commit 79595a42ab
2 changed files with 15 additions and 6 deletions

View file

@ -1588,13 +1588,19 @@ public class MwmActivity extends BaseMwmFragmentActivity
return;
}
if (mSearchController != null && mSearchController.hide())
if (mSearchController != null)
{
SearchEngine.INSTANCE.cancelInteractiveSearch();
if (mFilterController != null)
mFilterController.resetFilterAndParams();
mSearchController.clear();
return;
if (mSearchController.closeBottomMenu())
return;
if (mSearchController.hide())
{
SearchEngine.INSTANCE.cancelInteractiveSearch();
if (mFilterController != null)
mFilterController.resetFilterAndParams();
mSearchController.clear();
return;
}
}
boolean isRoutingCancelled = RoutingController.get().cancel();

View file

@ -711,6 +711,9 @@ public class SearchFragment extends BaseMwmFragment
@Override
public boolean onBackPressed()
{
if (mToolbarController.closeBottomMenu())
return true;
if (mToolbarController.hasQuery())
{
mToolbarController.clear();