diff options
| author | Bananeweizen <Bananeweizen@gmx.de> | 2013-03-30 20:21:01 +0100 |
|---|---|---|
| committer | Bananeweizen <Bananeweizen@gmx.de> | 2013-03-30 20:21:01 +0100 |
| commit | 32460d132a0906fd39e92c1ce1c5088920ddf23c (patch) | |
| tree | 5994d33ebcda1738530233c8d7339d0adbfe59a8 /main/src/cgeo/geocaching/gcvote | |
| parent | bd66d5eeb4ea95325630dae58aaf7f1043085781 (diff) | |
| download | cgeo-32460d132a0906fd39e92c1ce1c5088920ddf23c.zip cgeo-32460d132a0906fd39e92c1ce1c5088920ddf23c.tar.gz cgeo-32460d132a0906fd39e92c1ce1c5088920ddf23c.tar.bz2 | |
refactoring of cache logging code
* simplify control flow
* move sanity checks into GCVote and twitter methods
Diffstat (limited to 'main/src/cgeo/geocaching/gcvote')
| -rw-r--r-- | main/src/cgeo/geocaching/gcvote/GCVote.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/gcvote/GCVote.java b/main/src/cgeo/geocaching/gcvote/GCVote.java index a053f31..f6cfb84 100644 --- a/main/src/cgeo/geocaching/gcvote/GCVote.java +++ b/main/src/cgeo/geocaching/gcvote/GCVote.java @@ -173,12 +173,15 @@ public final class GCVote { /** * Transmit user vote to gcvote.com - * + * * @param cache * @param vote - * @return + * @return {@code true} if the rating was submitted successfully */ public static boolean setRating(Geocache cache, double vote) { + if (!Settings.isGCvoteLogin()) { + return false; + } if (!cache.supportsGCVote()) { return false; } |
