diff options
Diffstat (limited to 'main/src/cgeo/geocaching/cgCache.java')
| -rw-r--r-- | main/src/cgeo/geocaching/cgCache.java | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/main/src/cgeo/geocaching/cgCache.java b/main/src/cgeo/geocaching/cgCache.java index 24bd66b..b120581 100644 --- a/main/src/cgeo/geocaching/cgCache.java +++ b/main/src/cgeo/geocaching/cgCache.java @@ -47,6 +47,7 @@ import java.util.Collections; import java.util.Date; import java.util.EnumSet; import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.regex.Pattern; @@ -88,7 +89,6 @@ public class cgCache implements ICache, IWaypoint { private boolean premiumMembersOnly = false; private boolean found = false; private boolean favorite = false; - private boolean own = false; private int favoritePoints = 0; private float rating = 0; // valid ratings are larger than zero private int votes = 0; @@ -187,7 +187,6 @@ public class cgCache implements ICache, IWaypoint { reliableLatLon = other.reliableLatLon; archived = other.archived; found = other.found; - own = other.own; disabled = other.disabled; favorite = other.favorite; onWatchlist = other.onWatchlist; @@ -352,7 +351,6 @@ public class cgCache implements ICache, IWaypoint { cacheType == other.cacheType && size == other.size && found == other.found && - own == other.own && premiumMembersOnly == other.premiumMembersOnly && difficulty == other.difficulty && terrain == other.terrain && @@ -472,14 +470,13 @@ public class cgCache implements ICache, IWaypoint { } public List<LogType> getPossibleLogTypes() { - boolean isOwner = getOwnerUserId() != null && getOwnerUserId().equalsIgnoreCase(Settings.getUsername()); - List<LogType> logTypes = new ArrayList<LogType>(); + final List<LogType> logTypes = new LinkedList<LogType>(); if (isEventCache()) { logTypes.add(LogType.WILL_ATTEND); logTypes.add(LogType.NOTE); logTypes.add(LogType.ATTENDED); logTypes.add(LogType.NEEDS_ARCHIVE); - if (isOwner) { + if (isOwner()) { logTypes.add(LogType.ANNOUNCEMENT); } } else if (CacheType.WEBCAM == cacheType) { @@ -495,7 +492,7 @@ public class cgCache implements ICache, IWaypoint { logTypes.add(LogType.NEEDS_ARCHIVE); logTypes.add(LogType.NEEDS_MAINTENANCE); } - if (isOwner) { + if (isOwner()) { logTypes.add(LogType.OWNER_MAINTENANCE); logTypes.add(LogType.TEMP_DISABLE_LISTING); logTypes.add(LogType.ENABLE_LISTING); @@ -593,8 +590,8 @@ public class cgCache implements ICache, IWaypoint { } @Override - public boolean isOwn() { - return own; + public boolean isOwner() { + return getConnector().isOwner(this); } @Override @@ -1076,10 +1073,6 @@ public class cgCache implements ICache, IWaypoint { this.found = found; } - public void setOwn(boolean own) { - this.own = own; - } - public void setAttributes(List<String> attributes) { this.attributes.set(attributes); } |
