diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-10-28 20:43:59 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-10-28 20:45:51 +0100 |
| commit | d005b2fab5f4b8c10361b136762f5f43db378688 (patch) | |
| tree | bfe9da6c69fb95989f4250b97717731719980fe9 /main/src/cgeo/geocaching/DataStore.java | |
| parent | c48367feb633669c061da16778ad8ce0582f475d (diff) | |
| download | cgeo-d005b2fab5f4b8c10361b136762f5f43db378688.zip cgeo-d005b2fab5f4b8c10361b136762f5f43db378688.tar.gz cgeo-d005b2fab5f4b8c10361b136762f5f43db378688.tar.bz2 | |
Add a Geocache.getGeocodes helper for a common pattern
Diffstat (limited to 'main/src/cgeo/geocaching/DataStore.java')
| -rw-r--r-- | main/src/cgeo/geocaching/DataStore.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/DataStore.java b/main/src/cgeo/geocaching/DataStore.java index c5db7d4..1aba760 100644 --- a/main/src/cgeo/geocaching/DataStore.java +++ b/main/src/cgeo/geocaching/DataStore.java @@ -2492,13 +2492,11 @@ public class DataStore { init(); - final Set<String> geocodes = new HashSet<>(caches.size()); for (final Geocache cache : caches) { - geocodes.add(cache.getGeocode()); cache.setLogOffline(false); } - database.execSQL(String.format("DELETE FROM %s where %s", dbTableLogsOffline, whereGeocodeIn(geocodes))); + database.execSQL(String.format("DELETE FROM %s where %s", dbTableLogsOffline, whereGeocodeIn(Geocache.getGeocodes(caches)))); } public static boolean hasLogOffline(final String geocode) { |
