diff options
author | ByteHamster <info@bytehamster.com> | 2020-02-05 16:51:59 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-02-05 16:51:59 +0100 |
commit | d74b8d06b21448a1ac2441bbdd95ff8179b754e8 (patch) | |
tree | f5c9f571935c05a417ed312b3db256b51926af5a /app/src/main/java/de/danoeh/antennapod/adapter/actionbutton | |
parent | c3e1f8afbbb798c2bc1fde2d835d19cce5ebfc31 (diff) | |
parent | f790b78b1a6c2aaf0fb789be9542d09ed2da47d2 (diff) | |
download | AntennaPod-d74b8d06b21448a1ac2441bbdd95ff8179b754e8.zip |
Merge branch 'develop' into extract-queue-item-view
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter/actionbutton')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/ItemActionButton.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/ItemActionButton.java b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/ItemActionButton.java index 970a1cfae..47eab7d05 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/ItemActionButton.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/ItemActionButton.java @@ -34,7 +34,7 @@ public abstract class ItemActionButton { } @NonNull - public static ItemActionButton forItem(@NonNull FeedItem item, boolean isInQueue) { + public static ItemActionButton forItem(@NonNull FeedItem item, boolean isInQueue, boolean allowStream) { final FeedMedia media = item.getMedia(); if (media == null) { return new MarkAsPlayedActionButton(item); @@ -45,9 +45,10 @@ public abstract class ItemActionButton { return new PlayActionButton(item); } else if (isDownloadingMedia) { return new CancelDownloadActionButton(item); - } else if (UserPreferences.streamOverDownload()) { + } else if (UserPreferences.streamOverDownload() && allowStream) { return new StreamActionButton(item); - } else if (MobileDownloadHelper.userAllowedMobileDownloads() || !MobileDownloadHelper.userChoseAddToQueue() || isInQueue) { + } else if (MobileDownloadHelper.userAllowedMobileDownloads() + || !MobileDownloadHelper.userChoseAddToQueue() || isInQueue) { return new DownloadActionButton(item, isInQueue); } else { return new AddToQueueActionButton(item); |