diff options
author | Portree-Kid <keith.paterson@gmx.de> | 2013-03-08 15:06:41 +0100 |
---|---|---|
committer | Portree-Kid <keith.paterson@gmx.de> | 2013-03-08 15:06:41 +0100 |
commit | a0932683fdf840fd97464e93a4597fac5c93a731 (patch) | |
tree | a0e27bbad9012436d378da27f3e2b052a0edb2f3 /main/src/cgeo/geocaching/loaders/RemoveFromHistoryLoader.java | |
parent | cfb16fb725c069f59d545a50ba40045320a55c2c (diff) | |
download | cgeo-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.java | 28 |
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); + } + +} |