From 08aab24f482d3d99329e0d73a4b17eeded0c1c12 Mon Sep 17 00:00:00 2001 From: Dmitry Donskoy Date: Fri, 23 Aug 2019 16:09:05 +0300 Subject: [PATCH] [android] Added a refresh of the "filter and show on the map" view when user moved to the search screen first time --- android/src/com/mapswithme/maps/MwmActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java index 7e619997d5..ab19783a63 100644 --- a/android/src/com/mapswithme/maps/MwmActivity.java +++ b/android/src/com/mapswithme/maps/MwmActivity.java @@ -516,6 +516,7 @@ public class MwmActivity extends BaseMwmFragmentActivity mSearchController = new FloatingSearchToolbarController(this, this); mSearchController.getToolbar().getViewTreeObserver().addOnGlobalLayoutListener(new ToolbarLayoutChangeListener()); mSearchController.setVisibilityListener(this); + SearchEngine.INSTANCE.addListener(this); SharingHelper.INSTANCE.initialize(); @@ -1336,7 +1337,6 @@ public class MwmActivity extends BaseMwmFragmentActivity protected void onStart() { super.onStart(); - SearchEngine.INSTANCE.addListener(this); Framework.nativeSetMapObjectListener(this); BookmarkManager.INSTANCE.addLoadingListener(this); BookmarkManager.INSTANCE.addCatalogListener(this); @@ -1351,7 +1351,6 @@ public class MwmActivity extends BaseMwmFragmentActivity protected void onStop() { super.onStop(); - SearchEngine.INSTANCE.removeListener(this); Framework.nativeRemoveMapObjectListener(); BookmarkManager.INSTANCE.removeLoadingListener(this); BookmarkManager.INSTANCE.removeCatalogListener(this); @@ -1377,6 +1376,7 @@ public class MwmActivity extends BaseMwmFragmentActivity mToggleMapLayerController.detachCore(); TrafficManager.INSTANCE.detachAll(); mPlacePageController.destroy(); + SearchEngine.INSTANCE.removeListener(this); } @Override