aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/CachePopup.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/CachePopup.java')
-rw-r--r--main/src/cgeo/geocaching/CachePopup.java17
1 files changed, 2 insertions, 15 deletions
diff --git a/main/src/cgeo/geocaching/CachePopup.java b/main/src/cgeo/geocaching/CachePopup.java
index c6c7c1c..38c6e65 100644
--- a/main/src/cgeo/geocaching/CachePopup.java
+++ b/main/src/cgeo/geocaching/CachePopup.java
@@ -12,6 +12,7 @@ import cgeo.geocaching.utils.Log;
import org.apache.commons.lang3.StringUtils;
import rx.functions.Action1;
+import rx.schedulers.Schedulers;
import android.content.Context;
import android.content.Intent;
@@ -159,21 +160,7 @@ public class CachePopup extends AbstractPopupActivity {
final StoreCacheHandler refreshCacheHandler = new StoreCacheHandler(R.string.cache_dialog_offline_save_message);
progress.show(CachePopup.this, res.getString(R.string.cache_dialog_refresh_title), res.getString(R.string.cache_dialog_refresh_message), true, refreshCacheHandler.cancelMessage());
- new RefreshCacheThread(refreshCacheHandler).start();
- }
- }
-
- private class RefreshCacheThread extends Thread {
- final private CancellableHandler handler;
-
- public RefreshCacheThread(final CancellableHandler handler) {
- this.handler = handler;
- }
-
- @Override
- public void run() {
- cache.refresh(cache.getListId(), handler);
- handler.sendEmptyMessage(0);
+ cache.refresh(cache.getListId(), refreshCacheHandler, Schedulers.io());
}
}