aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java
diff options
context:
space:
mode:
authorPortree-Kid <keith.paterson@gmx.de>2013-03-08 15:06:41 +0100
committerPortree-Kid <keith.paterson@gmx.de>2013-03-08 15:06:41 +0100
commita0932683fdf840fd97464e93a4597fac5c93a731 (patch)
treea0e27bbad9012436d378da27f3e2b052a0edb2f3 /main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java
parentcfb16fb725c069f59d545a50ba40045320a55c2c (diff)
downloadcgeo-a0932683fdf840fd97464e93a4597fac5c93a731.zip
cgeo-a0932683fdf840fd97464e93a4597fac5c93a731.tar.gz
cgeo-a0932683fdf840fd97464e93a4597fac5c93a731.tar.bz2
Refactoring to use Loaders fixes #2365
Diffstat (limited to 'main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java')
-rw-r--r--main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java b/main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java
new file mode 100644
index 0000000..7e9ea8f
--- /dev/null
+++ b/main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java
@@ -0,0 +1,28 @@
+package cgeo.geocaching.loaders;
+
+import cgeo.geocaching.SearchResult;
+import cgeo.geocaching.Settings;
+import cgeo.geocaching.cgData;
+import cgeo.geocaching.enumerations.CacheType;
+import cgeo.geocaching.geopoint.Geopoint;
+
+import android.content.Context;
+
+public class RemoveFromHistoryLoader extends AbstractSearchLoader {
+
+ private String[] selected;
+ private Geopoint coords;
+
+ public RemoveFromHistoryLoader(Context context, String[] selected, Geopoint coords) {
+ super(context);
+ this.selected = selected;
+ this.coords = coords;
+ }
+
+ @Override
+ public SearchResult runSearch() {
+ cgData.clearVisitDate(selected);
+ return cgData.getHistoryOfCaches(true, coords != null ? Settings.getCacheType() : CacheType.ALL);
+ }
+
+}