From 308a872de037e7363ea0cb62597da7b5b10837e6 Mon Sep 17 00:00:00 2001 From: PaulStets Date: Fri, 2 Feb 2018 12:30:32 +0200 Subject: [PATCH 1/3] Fixed the dash removal for internal renderers --- OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index bea1ac0eb1..a859c71530 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -517,7 +517,7 @@ public class ConfigureMapMenu { if (item.equals(selectedName)) { selected = i; } - visibleNamesList.add(item.replace('_', ' ').replace('-', ' ')); + visibleNamesList.add(item); i++; } From fa515e97bcfdbf87fbe7eb6cfa588cd80c75edb0 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Fri, 2 Feb 2018 14:46:49 +0300 Subject: [PATCH 2/3] Fix opening hours UI --- .../src/net/osmand/util/OpeningHoursParser.java | 4 ++-- OsmAnd/res/layout/map_context_menu_fragment.xml | 9 +++++++++ .../osmand/plus/mapcontextmenu/MapContextMenu.java | 2 +- .../mapcontextmenu/MapContextMenuFragment.java | 7 +++++-- .../osmand/plus/mapcontextmenu/MenuController.java | 14 ++++++++++++-- .../controllers/MapDataMenuController.java | 2 +- .../osmand/plus/osmedit/EditPOIMenuController.java | 2 +- .../ParkingPositionMenuController.java | 2 +- 8 files changed, 32 insertions(+), 10 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java b/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java index 870ab9b01f..3762dade8b 100644 --- a/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java +++ b/OsmAnd-java/src/net/osmand/util/OpeningHoursParser.java @@ -1016,7 +1016,7 @@ public class OpeningHoursParser { if (b.charAt(b.length() - 1) != ' ') { b.append(" "); } - b.append("(").append(comment).append(")"); + b.append("- ").append(comment); } else { b.append(comment); } @@ -1136,7 +1136,7 @@ public class OpeningHoursParser { } String res = sb.toString(); if (res.length() > 0 && !Algorithms.isEmpty(comment)) { - res += " (" + comment + ")"; + res += " - " + comment; } return res; } diff --git a/OsmAnd/res/layout/map_context_menu_fragment.xml b/OsmAnd/res/layout/map_context_menu_fragment.xml index 46964956a4..60d0136612 100644 --- a/OsmAnd/res/layout/map_context_menu_fragment.xml +++ b/OsmAnd/res/layout/map_context_menu_fragment.xml @@ -108,6 +108,15 @@ osmand:typeface="@string/font_roboto_medium" tools:text="Museum"/> + + Date: Fri, 2 Feb 2018 14:25:53 +0200 Subject: [PATCH 3/3] Fix concurrent modification exception --- .../net/osmand/plus/resources/IncrementalChangesManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java b/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java index be1e017631..4136e75e72 100644 --- a/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java +++ b/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java @@ -88,7 +88,8 @@ public class IncrementalChangesManager { if (!regionUpdateFiles.dayUpdates.isEmpty()) { ArrayList list = new ArrayList(regionUpdateFiles.dayUpdates.keySet()); for (String month : list) { - Iterator it = regionUpdateFiles.dayUpdates.get(month).iterator(); + List newList = new ArrayList<>(regionUpdateFiles.dayUpdates.get(month)); + Iterator it = newList.iterator(); RegionUpdate monthRu = regionUpdateFiles.monthUpdates.get(month); while (it.hasNext()) { RegionUpdate ru = it.next(); @@ -100,6 +101,7 @@ public class IncrementalChangesManager { log.info("Delete overlapping day update " + ru.file.getName()); } } + regionUpdateFiles.dayUpdates.put(month, newList); } } }