aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/SearchResult.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/SearchResult.java')
-rw-r--r--main/src/cgeo/geocaching/SearchResult.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/SearchResult.java b/main/src/cgeo/geocaching/SearchResult.java
index 12a2522..3fe1b53 100644
--- a/main/src/cgeo/geocaching/SearchResult.java
+++ b/main/src/cgeo/geocaching/SearchResult.java
@@ -12,6 +12,7 @@ import cgeo.geocaching.gcvote.GCVote;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.Nullable;
+
import rx.Observable;
import rx.functions.Func1;
import rx.functions.Func2;
@@ -60,6 +61,14 @@ public class SearchResult implements Parcelable {
}
/**
+ * Build a new empty search result with an error status.
+ */
+ public SearchResult(final StatusCode statusCode) {
+ this();
+ error = statusCode;
+ }
+
+ /**
* Copy a search result, for example to apply different filters on it.
*
* @param searchResult the original search result, which cannot be null
@@ -218,7 +227,7 @@ public class SearchResult implements Parcelable {
int excluded = 0;
for (Geocache cache : caches) {
// Is there any reason to exclude the cache from the list?
- final boolean excludeCache = (excludeDisabled && cache.isDisabled()) ||
+ final boolean excludeCache = (excludeDisabled && (cache.isDisabled() || cache.isArchived())) ||
(excludeMine && (cache.isOwner() || cache.isFound())) ||
(!cacheType.contains(cache));
if (excludeCache) {