diff options
| author | Marco Jacob <mjacob@union06.de> | 2013-04-22 12:08:25 -0700 |
|---|---|---|
| committer | Marco Jacob <mjacob@union06.de> | 2013-04-22 12:08:25 -0700 |
| commit | 474a15126b1c22841f538e8c855a93b9658a6dc0 (patch) | |
| tree | 17355c9f2399e8e16bccc65289cdecb4827a14b5 | |
| parent | 6b421b17d247214c5fc9df494f9d2d5006cd7743 (diff) | |
| parent | 92a7d243bba95870ff7b702fe46447817142f1c7 (diff) | |
| download | cgeo-474a15126b1c22841f538e8c855a93b9658a6dc0.zip cgeo-474a15126b1c22841f538e8c855a93b9658a6dc0.tar.gz cgeo-474a15126b1c22841f538e8c855a93b9658a6dc0.tar.bz2 | |
Merge pull request #2673 from donEgro/release
Fixed Issue #708 - Refresh caches + no internet = normal progress.
| -rw-r--r-- | main/src/cgeo/geocaching/CacheDetailActivity.java | 5 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/CachePopup.java | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java index 9a13f91..074f111 100644 --- a/main/src/cgeo/geocaching/CacheDetailActivity.java +++ b/main/src/cgeo/geocaching/CacheDetailActivity.java @@ -1343,6 +1343,11 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc return; } + if (!Network.isNetworkConnected(getApplicationContext())) { + showToast(getString(R.string.err_server)); + return; + } + final RefreshCacheHandler refreshCacheHandler = new RefreshCacheHandler(); progress.show(CacheDetailActivity.this, res.getString(R.string.cache_dialog_refresh_title), res.getString(R.string.cache_dialog_refresh_message), true, refreshCacheHandler.cancelMessage()); diff --git a/main/src/cgeo/geocaching/CachePopup.java b/main/src/cgeo/geocaching/CachePopup.java index e6d0148..d51f9f2 100644 --- a/main/src/cgeo/geocaching/CachePopup.java +++ b/main/src/cgeo/geocaching/CachePopup.java @@ -3,6 +3,7 @@ package cgeo.geocaching; import cgeo.geocaching.activity.Progress; import cgeo.geocaching.apps.cache.navi.NavigationAppFactory; import cgeo.geocaching.geopoint.Geopoint; +import cgeo.geocaching.network.Network; import cgeo.geocaching.ui.CacheDetailsCreator; import cgeo.geocaching.utils.CancellableHandler; import cgeo.geocaching.utils.Log; @@ -160,6 +161,11 @@ public class CachePopup extends AbstractPopupActivity { return; } + if (!Network.isNetworkConnected(getApplicationContext())) { + showToast(getString(R.string.err_server)); + return; + } + final RefreshCacheHandler refreshCacheHandler = new RefreshCacheHandler(); 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(); |
