From 401dee1f4c9b1eeec03f2c0b19163c59471ce771 Mon Sep 17 00:00:00 2001 From: sonora Date: Sat, 6 Aug 2016 09:50:35 +0200 Subject: [PATCH] provide extra trim() --- OsmAnd/src/net/osmand/plus/routing/RouteDirectionInfo.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteDirectionInfo.java b/OsmAnd/src/net/osmand/plus/routing/RouteDirectionInfo.java index 15b5b4d00d..544c584515 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteDirectionInfo.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteDirectionInfo.java @@ -38,10 +38,9 @@ public class RouteDirectionInfo { public String getDescriptionRoute(OsmandApplication ctx) { if (!descriptionRoute.endsWith(" " + OsmAndFormatter.getFormattedDistance(distance, ctx))) { - return descriptionRoute + " " + OsmAndFormatter.getFormattedDistance(distance, ctx); - } else { - return descriptionRoute; + descriptionRoute += " " + OsmAndFormatter.getFormattedDistance(distance, ctx); } + return descriptionRoute.trim(); } public String getDescriptionRoutePart() {