aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/LogCacheActivity.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-09-12 08:10:49 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-09-12 08:10:49 +0200
commitcf4322dc3fdc337307e83ae65ef36dd89f8ef7c1 (patch)
treecd17415d817c197c4c12c9f07ac715b3af4ec91d /main/src/cgeo/geocaching/LogCacheActivity.java
parentd47b38e071ab91e5f9b421f64dc18105f2596e68 (diff)
downloadcgeo-cf4322dc3fdc337307e83ae65ef36dd89f8ef7c1.zip
cgeo-cf4322dc3fdc337307e83ae65ef36dd89f8ef7c1.tar.gz
cgeo-cf4322dc3fdc337307e83ae65ef36dd89f8ef7c1.tar.bz2
refactoring: cleanup of gcvote code
Diffstat (limited to 'main/src/cgeo/geocaching/LogCacheActivity.java')
-rw-r--r--main/src/cgeo/geocaching/LogCacheActivity.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/LogCacheActivity.java b/main/src/cgeo/geocaching/LogCacheActivity.java
index 41d3854..0ff0c97 100644
--- a/main/src/cgeo/geocaching/LogCacheActivity.java
+++ b/main/src/cgeo/geocaching/LogCacheActivity.java
@@ -213,7 +213,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
if (!postButton.isEnabled()) {
return res.getString(R.string.log_post_not_possible);
}
- if (!Settings.isGCvoteLogin() || !cache.supportsGCVote()) {
+ if (!GCVote.isVotingPossible(cache)) {
return res.getString(R.string.log_post);
}
if (GCVote.isValidRating(rating)) {
@@ -423,8 +423,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
- final boolean voteAvailable = Settings.isGCvoteLogin() && StringUtils.isNotBlank(cache.getGuid()) && cache.supportsGCVote();
- menu.findItem(SUBMENU_VOTE).setVisible(voteAvailable);
+ menu.findItem(SUBMENU_VOTE).setVisible(GCVote.isVotingPossible(cache));
return true;
}