aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorBananeweizen <Bananeweizen@gmx.de>2012-05-09 21:58:15 -0700
committerBananeweizen <Bananeweizen@gmx.de>2012-05-09 21:58:15 -0700
commit0f5fcf18ede16f209d346ae6872238d5499b0b98 (patch)
treedf0a9689cd87113d0af746c05baf3b34267be9a7 /main/src
parent28b59d2026261300ce96b783ce22ef06d213735c (diff)
parentbf69d3f69318242554b18d508167b15ddc961e0c (diff)
downloadcgeo-0f5fcf18ede16f209d346ae6872238d5499b0b98.zip
cgeo-0f5fcf18ede16f209d346ae6872238d5499b0b98.tar.gz
cgeo-0f5fcf18ede16f209d346ae6872238d5499b0b98.tar.bz2
Merge pull request #1525 from SammysHP/watchlist
Fix #1430: Watchlist state toggling not recorded
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/CacheDetailActivity.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java
index 679cb10..a3ce685 100644
--- a/main/src/cgeo/geocaching/CacheDetailActivity.java
+++ b/main/src/cgeo/geocaching/CacheDetailActivity.java
@@ -1634,7 +1634,11 @@ public class CacheDetailActivity extends AbstractActivity {
@Override
public void run() {
- handler.sendEmptyMessage(GCConnector.addToWatchlist(cache));
+ final int result = GCConnector.addToWatchlist(cache);
+ if (-1 != result) {
+ app.saveCache(cache, cache.getListId() != StoredList.TEMPORARY_LIST_ID ? LoadFlags.SAVE_ALL : EnumSet.of(SaveFlag.SAVE_CACHE));
+ }
+ handler.sendEmptyMessage(result);
}
}
@@ -1648,7 +1652,11 @@ public class CacheDetailActivity extends AbstractActivity {
@Override
public void run() {
- handler.sendEmptyMessage(GCConnector.removeFromWatchlist(cache));
+ final int result = GCConnector.removeFromWatchlist(cache);
+ if (-1 != result) {
+ app.saveCache(cache, cache.getListId() != StoredList.TEMPORARY_LIST_ID ? LoadFlags.SAVE_ALL : EnumSet.of(SaveFlag.SAVE_CACHE));
+ }
+ handler.sendEmptyMessage(result);
}
}