Merge pull request #3941 from ByteHamster/fix-delete-button-visibility
Fix delete button visibility
This commit is contained in:
commit
dd5234cd2f
|
@ -38,6 +38,6 @@ public class DeleteActionButton extends ItemActionButton {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getVisibility() {
|
public int getVisibility() {
|
||||||
return (item.isPlayed()) ? View.INVISIBLE : View.VISIBLE;
|
return (item.getMedia() != null && item.getMedia().isDownloaded()) ? View.VISIBLE : View.INVISIBLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,6 @@ public class DownloadActionButton extends ItemActionButton {
|
||||||
private void downloadEpisode(Context context) {
|
private void downloadEpisode(Context context) {
|
||||||
try {
|
try {
|
||||||
DownloadRequester.getInstance().downloadMedia(context, item);
|
DownloadRequester.getInstance().downloadMedia(context, item);
|
||||||
Toast.makeText(context, R.string.status_downloading_label, Toast.LENGTH_SHORT).show();
|
|
||||||
} catch (DownloadRequestException e) {
|
} catch (DownloadRequestException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
DownloadRequestErrorDialogCreator.newRequestErrorDialog(context, e.getMessage());
|
DownloadRequestErrorDialogCreator.newRequestErrorDialog(context, e.getMessage());
|
||||||
|
|
Loading…
Reference in New Issue