diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-04-21 13:55:38 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-04-21 13:55:38 +0200 |
| commit | bf1f66ee69ce76f3bc6c23af7d780f595add149a (patch) | |
| tree | 2c57e76525bd31d9873b0bcce4083df7a0756f71 /main/src/cgeo | |
| parent | 08ccf4c2798b21deeb9395966ecadf72508d1458 (diff) | |
| download | cgeo-bf1f66ee69ce76f3bc6c23af7d780f595add149a.zip cgeo-bf1f66ee69ce76f3bc6c23af7d780f595add149a.tar.gz cgeo-bf1f66ee69ce76f3bc6c23af7d780f595add149a.tar.bz2 | |
work on #3780: do not reload caches to get their attributes
The attributes are lazily loaded, so they will always be up-to-date.
Diffstat (limited to 'main/src/cgeo')
| -rw-r--r-- | main/src/cgeo/geocaching/filter/AttributeFilter.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/main/src/cgeo/geocaching/filter/AttributeFilter.java b/main/src/cgeo/geocaching/filter/AttributeFilter.java index 6f0d5da..552a48c 100644 --- a/main/src/cgeo/geocaching/filter/AttributeFilter.java +++ b/main/src/cgeo/geocaching/filter/AttributeFilter.java @@ -1,14 +1,11 @@ package cgeo.geocaching.filter; import cgeo.geocaching.CgeoApplication; -import cgeo.geocaching.DataStore; import cgeo.geocaching.Geocache; import cgeo.geocaching.R; -import cgeo.geocaching.enumerations.LoadFlags.LoadFlag; import android.content.res.Resources; -import java.util.EnumSet; import java.util.LinkedList; import java.util.List; @@ -29,11 +26,7 @@ class AttributeFilter extends AbstractFilter { @Override public boolean accepts(final Geocache cache) { - Geocache fullCache = DataStore.loadCache(cache.getGeocode(), EnumSet.of(LoadFlag.LOAD_ATTRIBUTES)); - if (fullCache == null) { - fullCache = cache; - } - return fullCache.getAttributes().contains(attribute); + return cache.getAttributes().contains(attribute); } public static class Factory implements IFilterFactory { |
