Merge pull request #3941 from ByteHamster/fix-delete-button-visibility

Fix delete button visibility
This commit is contained in:
H. Lehmann 2020-03-18 00:48:50 +01:00 committed by GitHub
commit dd5234cd2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -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());