aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/res/values/changelog_release.xml4
-rw-r--r--main/src/cgeo/geocaching/DataStore.java2
-rw-r--r--main/src/cgeo/geocaching/LogCacheActivity.java5
-rw-r--r--main/src/cgeo/geocaching/TrackableActivity.java7
4 files changed, 15 insertions, 3 deletions
diff --git a/main/res/values/changelog_release.xml b/main/res/values/changelog_release.xml
index f589bac..b4f2e2d 100644
--- a/main/res/values/changelog_release.xml
+++ b/main/res/values/changelog_release.xml
@@ -4,6 +4,10 @@
<string name="changelog_release" translatable="false">\n
<b>Next bugfix release:</b>\n
· Fix: Use phone language instead of country when requesting opencaching data\n
+ · Fix: Menu for scanning trackable and geocache codes wrongly hidden\n
+ · Fix: Recognize Sygic voucher edition\n
+ · Fix: Update locally stored GCVote when sending over network\n
+ \n
<b>2014.12.22:</b>\n
· New: Updated translations\n
· New: Google Play services are disabled by default on Android before 4.0\n
diff --git a/main/src/cgeo/geocaching/DataStore.java b/main/src/cgeo/geocaching/DataStore.java
index 1081828..bd6e3e5 100644
--- a/main/src/cgeo/geocaching/DataStore.java
+++ b/main/src/cgeo/geocaching/DataStore.java
@@ -28,6 +28,7 @@ import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import rx.Observable;
import rx.Observable.OnSubscribe;
@@ -2010,6 +2011,7 @@ public class DataStore {
return trackables;
}
+ @Nullable
public static Trackable loadTrackable(final String geocode) {
if (StringUtils.isBlank(geocode)) {
return null;
diff --git a/main/src/cgeo/geocaching/LogCacheActivity.java b/main/src/cgeo/geocaching/LogCacheActivity.java
index 46b185a..d708210 100644
--- a/main/src/cgeo/geocaching/LogCacheActivity.java
+++ b/main/src/cgeo/geocaching/LogCacheActivity.java
@@ -431,7 +431,10 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
}
if (GCVote.isValidRating(rating) && GCVote.isVotingPossible(cache)) {
- if (!GCVote.setRating(cache, rating)) {
+ if (GCVote.setRating(cache, rating)) {
+ cache.setMyVote(rating);
+ DataStore.saveChangedCache(cache);
+ } else {
showToast(res.getString(R.string.err_gcvote_send_rating));
}
}
diff --git a/main/src/cgeo/geocaching/TrackableActivity.java b/main/src/cgeo/geocaching/TrackableActivity.java
index a9f508c..45111f6 100644
--- a/main/src/cgeo/geocaching/TrackableActivity.java
+++ b/main/src/cgeo/geocaching/TrackableActivity.java
@@ -612,8 +612,11 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
// refresh the logs view after coming back from logging a trackable
if (trackable != null) {
final Trackable updatedTrackable = DataStore.loadTrackable(trackable.getGeocode());
- trackable.setLogs(updatedTrackable.getLogs());
- reinitializeViewPager();
+ // if this activity is resumed after a long time, the trackable might be gone due to regular cleanup
+ if (updatedTrackable != null) {
+ trackable.setLogs(updatedTrackable.getLogs());
+ reinitializeViewPager();
+ }
}
}