diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2012-06-26 13:24:57 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2012-06-26 13:24:57 +0200 |
commit | 8965e3ea37e9ad64c291e3b37b27f698b59665d6 (patch) | |
tree | 38a1fb80a9bac03c64938fafca9292c967b5dd4b /src/de/podfetcher | |
parent | 6488e7982725f3174035e0c6562bae425a204c9a (diff) | |
download | AntennaPod-8965e3ea37e9ad64c291e3b37b27f698b59665d6.zip |
'Refresh all feeds'-menuitem is now invisible while refreshing feeds
Diffstat (limited to 'src/de/podfetcher')
-rw-r--r-- | src/de/podfetcher/activity/PodfetcherActivity.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/de/podfetcher/activity/PodfetcherActivity.java b/src/de/podfetcher/activity/PodfetcherActivity.java index 24264c64b..7a70203b7 100644 --- a/src/de/podfetcher/activity/PodfetcherActivity.java +++ b/src/de/podfetcher/activity/PodfetcherActivity.java @@ -109,6 +109,7 @@ public class PodfetcherActivity extends SherlockFragmentActivity { } else { setSupportProgressBarIndeterminateVisibility(false); } + invalidateOptionsMenu(); } @Override @@ -135,6 +136,17 @@ public class PodfetcherActivity extends SherlockFragmentActivity { } @Override + public boolean onPrepareOptionsMenu(Menu menu) { + MenuItem refreshAll = menu.findItem(R.id.all_feed_refresh); + if (DownloadService.isRunning && DownloadRequester.getInstance().isDownloadingFeeds()) { + refreshAll.setVisible(false); + } else { + refreshAll.setVisible(true); + } + return true; + } + + @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = new MenuInflater(this); inflater.inflate(R.menu.podfetcher, menu); |