diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2017-04-22 18:56:57 +0200 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2017-04-22 18:56:57 +0200 |
commit | 32d7202880e1f02729f7ddd542d9ee907c36eac6 (patch) | |
tree | 5ef21f4a98cebc296e9b5913aea10c3b94554663 | |
parent | 6a30dd611a652959396f403d521e5930b0c426e9 (diff) | |
download | AntennaPod-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.java | 8 |
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)); |