aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/loaders
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-10-02 09:19:50 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-10-02 09:19:50 +0200
commitfa619131bfd3d5cf5286b958ff88c6a225989ec9 (patch)
treee3dc14cb8e7dff4f9a069f7d05574cf41fe48dff /main/src/cgeo/geocaching/loaders
parentb0ab27642365da03495e8268019bf1ee7273e484 (diff)
downloadcgeo-fa619131bfd3d5cf5286b958ff88c6a225989ec9.zip
cgeo-fa619131bfd3d5cf5286b958ff88c6a225989ec9.tar.gz
cgeo-fa619131bfd3d5cf5286b958ff88c6a225989ec9.tar.bz2
new: search by name for opencaching
Diffstat (limited to 'main/src/cgeo/geocaching/loaders')
-rw-r--r--main/src/cgeo/geocaching/loaders/KeywordGeocacheListLoader.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/loaders/KeywordGeocacheListLoader.java b/main/src/cgeo/geocaching/loaders/KeywordGeocacheListLoader.java
index adfc423..c8132e7 100644
--- a/main/src/cgeo/geocaching/loaders/KeywordGeocacheListLoader.java
+++ b/main/src/cgeo/geocaching/loaders/KeywordGeocacheListLoader.java
@@ -1,8 +1,10 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.SearchResult;
-import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.connector.ConnectorFactory;
+import cgeo.geocaching.connector.capability.ISearchByKeyword;
import cgeo.geocaching.connector.gc.GCParser;
+import cgeo.geocaching.settings.Settings;
import android.content.Context;
@@ -17,7 +19,18 @@ public class KeywordGeocacheListLoader extends AbstractSearchLoader {
@Override
public SearchResult runSearch() {
- return GCParser.searchByKeyword(keyword, Settings.getCacheType(), Settings.isShowCaptcha(), this);
+ SearchResult searchResult = new SearchResult();
+ if (Settings.isGCConnectorActive()) {
+ searchResult = GCParser.searchByKeyword(keyword, Settings.getCacheType(), Settings.isShowCaptcha(), this);
+ }
+
+ for (ISearchByKeyword connector : ConnectorFactory.getSearchByKeywordConnectors()) {
+ if (connector.isActivated()) {
+ searchResult.addSearchResult(connector.searchByName(keyword));
+ }
+ }
+
+ return searchResult;
}
}