From 4998a9d9a268ab29231d5f04cfc718ec0a792cbb Mon Sep 17 00:00:00 2001 From: PaulStets Date: Tue, 19 Dec 2017 14:18:07 +0200 Subject: [PATCH] Fixed street duplication in search results --- OsmAnd-java/src/net/osmand/data/Street.java | 9 --------- OsmAnd-java/src/net/osmand/search/SearchUICore.java | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/data/Street.java b/OsmAnd-java/src/net/osmand/data/Street.java index fd1ec71798..7e45370578 100644 --- a/OsmAnd-java/src/net/osmand/data/Street.java +++ b/OsmAnd-java/src/net/osmand/data/Street.java @@ -86,13 +86,4 @@ public class Street extends MapObject { } return nm; } - - public boolean compareStreet(Street thatObj) { - boolean res = this.location.equals(thatObj.location); - if (res) { - res = (this.getNameWithoutCityPart("en", true).trim()).equals(thatObj.getNameWithoutCityPart("en", true).trim()); - } - return res; - } - } diff --git a/OsmAnd-java/src/net/osmand/search/SearchUICore.java b/OsmAnd-java/src/net/osmand/search/SearchUICore.java index c945bb188e..8b95a535a7 100644 --- a/OsmAnd-java/src/net/osmand/search/SearchUICore.java +++ b/OsmAnd-java/src/net/osmand/search/SearchUICore.java @@ -189,7 +189,7 @@ public class SearchUICore { if (r1.objectType == ObjectType.STREET) { Street st1 = (Street) r1.object; Street st2 = (Street) r2.object; - return st1.compareStreet(st2); + return st1.getLocation().equals(st2.getLocation()); } } Amenity a1 = null;