From dd1791a257f33b6117b97837fe311193e8684192 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Thu, 20 Feb 2020 18:59:18 +0200 Subject: [PATCH] Fix icon uniqueId --- OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java b/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java index 8a9d1876c9..960410e326 100644 --- a/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java +++ b/OsmAnd/src/net/osmand/plus/base/FavoriteImageDrawable.java @@ -173,13 +173,14 @@ public class FavoriteImageDrawable extends Drawable { private static TreeMap cache = new TreeMap<>(); private static FavoriteImageDrawable getOrCreate(Context ctx, int color, boolean withShadow, boolean synced, FavouritePoint point) { - String iconName = ""; + String uniqueId = ""; if (point != null) { - iconName = point.getIconEntryName(ctx); + uniqueId = point.getIconEntryName(ctx); + uniqueId += point.getBackType().name(); } color = color | 0xff000000; int hash = (color << 4) + ((withShadow ? 1 : 0) << 2) + ((synced ? 3 : 0) << 2); - String uniqueId = hash + iconName; + uniqueId = hash + uniqueId; FavoriteImageDrawable drawable = cache.get(uniqueId); if (drawable == null) { drawable = new FavoriteImageDrawable(ctx, color, withShadow, synced, point);