summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fietz <Martin.Fietz@gmail.com>2017-04-22 18:56:57 +0200
committerMartin Fietz <Martin.Fietz@gmail.com>2017-04-22 18:56:57 +0200
commit32d7202880e1f02729f7ddd542d9ee907c36eac6 (patch)
tree5ef21f4a98cebc296e9b5913aea10c3b94554663
parent6a30dd611a652959396f403d521e5930b0c426e9 (diff)
downloadAntennaPod-32d7202880e1f02729f7ddd542d9ee907c36eac6.zip
Don't show playlist button when queue is empty
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java
index c0b17ae25..e620da0bd 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java
@@ -387,7 +387,13 @@ public class PlaybackService extends MediaBrowserServiceCompat {
List<MediaBrowserCompat.MediaItem> mediaItems = new ArrayList<>();
if (parentId.equals(getResources().getString(R.string.app_name))) {
// Root List
- mediaItems.add(createBrowsableMediaItemForRoot());
+ try {
+ if (!(taskManager.getQueue().isEmpty())) {
+ mediaItems.add(createBrowsableMediaItemForRoot());
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
List<Feed> feeds = DBReader.getFeedList();
for (Feed feed: feeds) {
mediaItems.add(createBrowsableMediaItemForFeed(feed));