From 13bab7f916ad107cd4e424532eea6335c59a525c Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Wed, 18 Mar 2020 00:34:10 +0100 Subject: [PATCH 1/2] Fixed delete button visibility --- .../antennapod/adapter/actionbutton/DeleteActionButton.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } From 82e073908feeced4e8823f2182304623b1879f94 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Wed, 18 Mar 2020 00:36:44 +0100 Subject: [PATCH 2/2] Do not spam toast message when downloading --- .../antennapod/adapter/actionbutton/DownloadActionButton.java | 1 - 1 file changed, 1 deletion(-) 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());