summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Lehmann <ByteHamster@users.noreply.github.com>2020-03-18 00:48:50 +0100
committerGitHub <noreply@github.com>2020-03-18 00:48:50 +0100
commitdd5234cd2f91f30947cdbe7c60a47b4a01a4879c (patch)
tree42fb72e09df314de8b218f041b76a0c02cedd1dd
parent85cbebcae18199068ae8e3ccd622660069f35203 (diff)
parent82e073908feeced4e8823f2182304623b1879f94 (diff)
downloadAntennaPod-dd5234cd2f91f30947cdbe7c60a47b4a01a4879c.zip
Merge pull request #3941 from ByteHamster/fix-delete-button-visibility
Fix delete button visibility
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DeleteActionButton.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DownloadActionButton.java1
2 files changed, 1 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DeleteActionButton.java b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DeleteActionButton.java
index 4d1ae76a2..45cce23b8 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DeleteActionButton.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DeleteActionButton.java
@@ -38,6 +38,6 @@ public class DeleteActionButton extends ItemActionButton {
@Override
public int getVisibility() {
- return (item.isPlayed()) ? View.INVISIBLE : View.VISIBLE;
+ return (item.getMedia() != null && item.getMedia().isDownloaded()) ? View.VISIBLE : View.INVISIBLE;
}
}
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DownloadActionButton.java b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DownloadActionButton.java
index 0a1199e9b..f70d41a97 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DownloadActionButton.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/actionbutton/DownloadActionButton.java
@@ -72,7 +72,6 @@ public class DownloadActionButton extends ItemActionButton {
private void downloadEpisode(Context context) {
try {
DownloadRequester.getInstance().downloadMedia(context, item);
- Toast.makeText(context, R.string.status_downloading_label, Toast.LENGTH_SHORT).show();
} catch (DownloadRequestException e) {
e.printStackTrace();
DownloadRequestErrorDialogCreator.newRequestErrorDialog(context, e.getMessage());