From c40eb96bd751dd2b4513c512f13804218b289191 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 19 Apr 2021 13:46:14 +0200 Subject: [PATCH] Remove CategoriesSubHeader --- .../plus/mapmarkers/CategoriesSubHeader.java | 20 ------------------- .../plus/mapmarkers/MapMarkersGroup.java | 9 --------- .../plus/mapmarkers/MapMarkersHelper.java | 5 ----- .../adapters/MapMarkersGroupsAdapter.java | 17 ++++++++++++++-- 4 files changed, 15 insertions(+), 36 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/CategoriesSubHeader.java b/OsmAnd/src/net/osmand/plus/mapmarkers/CategoriesSubHeader.java index aef2f28afd..47353e409f 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/CategoriesSubHeader.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/CategoriesSubHeader.java @@ -2,23 +2,3 @@ package net.osmand.plus.mapmarkers; import androidx.annotation.DrawableRes; -public class CategoriesSubHeader { - - @DrawableRes - private int iconRes; - private MapMarkersGroup group; - - public CategoriesSubHeader(int iconRes, MapMarkersGroup group) { - this.iconRes = iconRes; - this.group = group; - } - - @DrawableRes - public int getIconRes() { - return iconRes; - } - - public MapMarkersGroup getGroup() { - return group; - } -} diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersGroup.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersGroup.java index 2a97af91c8..35a4585501 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersGroup.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersGroup.java @@ -31,7 +31,6 @@ public class MapMarkersGroup { private TravelArticle wikivoyageArticle; // TODO should be removed from this class: private GroupHeader header; - private CategoriesSubHeader categoriesSubHeader; private ShowHideHistoryButton showHideHistoryButton; public MapMarkersGroup() { @@ -76,10 +75,6 @@ public class MapMarkersGroup { this.header = header; } - public void setCategoriesSubHeader(CategoriesSubHeader categoriesSubHeader) { - this.categoriesSubHeader = categoriesSubHeader; - } - public void setShowHideHistoryButton(ShowHideHistoryButton showHideHistoryButton) { this.showHideHistoryButton = showHideHistoryButton; } @@ -144,10 +139,6 @@ public class MapMarkersGroup { return header; } - public CategoriesSubHeader getCategoriesSubHeader() { - return categoriesSubHeader; - } - public ShowHideHistoryButton getShowHideHistoryButton() { return showHideHistoryButton; } diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersHelper.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersHelper.java index 51911e8779..729a7f3cfd 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersHelper.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkersHelper.java @@ -481,17 +481,12 @@ public class MapMarkersHelper { private void createHeadersInGroup(@NonNull MapMarkersGroup group) { int type = group.getType(); int headerIconId = 0; - int subHeaderIconId = 0; if (type != -1) { headerIconId = type == MapMarkersGroup.FAVORITES_TYPE ? R.drawable.ic_action_favorite : R.drawable.ic_action_polygom_dark; - subHeaderIconId = R.drawable.ic_action_filter; } GroupHeader header = new GroupHeader(headerIconId, group); - CategoriesSubHeader categoriesSubHeader = new CategoriesSubHeader(subHeaderIconId, group); - group.setHeader(header); - group.setCategoriesSubHeader(categoriesSubHeader); } private void removeMarkerFromGroup(MapMarker marker) { diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java index fb74956b16..5cb3078e8e 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/adapters/MapMarkersGroupsAdapter.java @@ -21,7 +21,6 @@ import net.osmand.IndexConstants; import net.osmand.data.LatLon; import net.osmand.plus.GpxSelectionHelper; import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile; -import net.osmand.plus.mapmarkers.CategoriesSubHeader; import net.osmand.plus.mapmarkers.MapMarkersHelper; import net.osmand.plus.mapmarkers.GroupHeader; import net.osmand.plus.mapmarkers.MapMarker; @@ -160,7 +159,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter