From 50ff060486a8b22137fd58db95f2a1d33f514f94 Mon Sep 17 00:00:00 2001 From: androiddevkkotlin Date: Wed, 21 Oct 2020 16:45:00 +0300 Subject: [PATCH] Favorites: Allow to share the same name if favorites belong to different groups --- OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java index 6ebdaea6b4..4aaca14bb3 100644 --- a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java +++ b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java @@ -428,7 +428,7 @@ public class FavouritesDbHelper { while (fl) { fl = false; for (FavouritePoint fp : fdb.getFavouritePoints()) { - if (fp.getName().equals(name) && p.getLatitude() != fp.getLatitude() && p.getLongitude() != fp.getLongitude()) { + if (fp.getName().equals(name) && p.getLatitude() != fp.getLatitude() && p.getLongitude() != fp.getLongitude() && fp.getCategory().equals(p.getCategory())) { number++; index = " (" + number + ")"; name = p.getName() + index;