diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-04-24 09:27:19 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-04-24 09:27:19 +0200 |
| commit | 2ce258172e1368a751ea27b11e3582ad4a72261c (patch) | |
| tree | 497fa6258311da84695285ec112fa42aebe9676d /main/src | |
| parent | 3df46eebd51398e3262f918f30e00da6d36eeac4 (diff) | |
| download | cgeo-2ce258172e1368a751ea27b11e3582ad4a72261c.zip cgeo-2ce258172e1368a751ea27b11e3582ad4a72261c.tar.gz cgeo-2ce258172e1368a751ea27b11e3582ad4a72261c.tar.bz2 | |
#2675: remove superfluous separator
* non offline caches had a trailing separator
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/ui/Formatter.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/ui/Formatter.java b/main/src/cgeo/geocaching/ui/Formatter.java index 412b993..92a0defc 100644 --- a/main/src/cgeo/geocaching/ui/Formatter.java +++ b/main/src/cgeo/geocaching/ui/Formatter.java @@ -115,7 +115,7 @@ public abstract class Formatter { infos.add(cache.getGeocode()); } - infos.add(Formatter.formatCacheInfoShort(cache)); + addShortInfos(cache, infos); if (cache.isPremiumMembersOnly()) { infos.add(cgeoapplication.getInstance().getString(R.string.cache_premium)); @@ -128,6 +128,11 @@ public abstract class Formatter { public static String formatCacheInfoShort(Geocache cache) { final ArrayList<String> infos = new ArrayList<String>(); + addShortInfos(cache, infos); + return StringUtils.join(infos, Formatter.SEPARATOR); + } + + private static void addShortInfos(Geocache cache, final ArrayList<String> infos) { if (cache.hasDifficulty()) { infos.add("D " + String.format("%.1f", cache.getDifficulty())); } @@ -141,7 +146,6 @@ public abstract class Formatter { } else if (cache.isEventCache() && cache.getHiddenDate() != null) { infos.add(Formatter.formatShortDate(cache.getHiddenDate().getTime())); } - return StringUtils.join(infos, Formatter.SEPARATOR); } public static String formatCacheInfoHistory(Geocache cache) { |
