diff options
| -rw-r--r-- | main/src/cgeo/geocaching/LogCacheActivity.java | 2 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/LogEntry.java | 5 | ||||
| -rw-r--r-- | tests/src/cgeo/geocaching/files/GPXParserTest.java | 3 |
3 files changed, 4 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/LogCacheActivity.java b/main/src/cgeo/geocaching/LogCacheActivity.java index 3ed77e2..c9baac1 100644 --- a/main/src/cgeo/geocaching/LogCacheActivity.java +++ b/main/src/cgeo/geocaching/LogCacheActivity.java @@ -539,7 +539,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia final LogResult logResult = loggingManager.postLog(cache, typeSelected, date, log, logPwd, trackables); if (logResult.getPostLogResult() == StatusCode.NO_ERROR) { - final LogEntry logNow = new LogEntry(date, typeSelected, log); + final LogEntry logNow = new LogEntry(date.getTimeInMillis(), typeSelected, log); cache.getLogs().add(0, logNow); diff --git a/main/src/cgeo/geocaching/LogEntry.java b/main/src/cgeo/geocaching/LogEntry.java index 0121424..a01c431 100644 --- a/main/src/cgeo/geocaching/LogEntry.java +++ b/main/src/cgeo/geocaching/LogEntry.java @@ -9,7 +9,6 @@ import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; -import java.util.Calendar; import java.util.Collections; import java.util.List; import java.util.regex.Pattern; @@ -30,10 +29,6 @@ public final class LogEntry { public String cacheName = ""; // used for trackables public String cacheGuid = ""; // used for trackables - public LogEntry(final Calendar date, final LogType type, final String text) { - this(Settings.getUsername(), date.getTimeInMillis(), type, text); - } - public LogEntry(final long dateInMilliSeconds, final LogType type, final String text) { this(Settings.getUsername(), dateInMilliSeconds, type, text); } diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java index 892b2a0..06661eb 100644 --- a/tests/src/cgeo/geocaching/files/GPXParserTest.java +++ b/tests/src/cgeo/geocaching/files/GPXParserTest.java @@ -150,6 +150,9 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { assertEquals(parseTime("2011-09-11T07:00:00Z"), log.date); assertEquals(-1, log.found); assertEquals("Sehr schöne Runde und wir haben wieder etwas Neues über Hockenheim gelernt. Super Tarnung.\nTFTC, Geoteufel", log.log); + assertFalse(log.isOwn()); + assertEquals(log.log, log.getDisplayText()); + assertTrue(log.daysSinceLog() > 700); // following info is not contained in pocket query gpx file assertEquals(0, cache.getAttributes().size()); |
