From 0fbb4df13460fdec70ae3fb51eb64608e5962497 Mon Sep 17 00:00:00 2001 From: Chumva Date: Wed, 18 Jul 2018 12:11:26 +0300 Subject: [PATCH] refactor acquireDescriptionAndType --- OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java index 6e73db30f0..89c5b853f5 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java @@ -555,13 +555,11 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider private void acquireDescriptionAndType() { if (comments.size() > 0) { - String sb = comments.get(0).date + " " + comments.get(0).user; - description = comments.get(0).text; - typeName = sb; - } - if (description != null && description.length() < 100) { - if (comments.size() > 0) { - comments.remove(0); + Comment comment = comments.get(0); + description = comment.text; + typeName = comment.date + " " + comment.user; + if (description != null && description.length() < 100) { + comments.remove(comment); } } }