diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 5c7003965b..0a0016c447 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -793,6 +793,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis if (swipeDismissListener != null) { swipeDismissListener.discardUndo(); } + removeMapillaryFiltersFragment(); if (visible) { mapActivity.getContextMenu().hideMenues(); @@ -818,7 +819,6 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis View listViewLayout = dashboardView.findViewById(R.id.dash_list_view_layout); ScrollView scrollView = (ScrollView) dashboardView.findViewById(R.id.main_scroll); if (visibleType == DashboardType.DASHBOARD || visibleType == DashboardType.MAPILLARY) { - removeMapillaryFiltersFragment(); if (visibleType == DashboardType.DASHBOARD) { addOrUpdateDashboardFragments(); } else { diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryFiltersFragment.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryFiltersFragment.java index 6f5e474efb..4bc6f8d048 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryFiltersFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryFiltersFragment.java @@ -79,6 +79,7 @@ public class MapillaryFiltersFragment extends BaseOsmAndFragment { final Drawable drawable = getIcon(toggleIconId, toggleIconColorId); ((AppCompatImageView) toggleRow.findViewById(R.id.toggle_row_icon)).setImageDrawable(drawable); final CompoundButton toggle = (CompoundButton) toggleRow.findViewById(R.id.toggle_row_toggle); + toggle.setOnCheckedChangeListener(null); toggle.setChecked(selected); toggle.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override