|
|
|
@ -94,12 +94,6 @@ public class MovieInfoFragment extends AbstractInfoFragment
|
|
|
|
|
setOnDownloadListener(new View.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
DialogInterface.OnClickListener noopClickListener =
|
|
|
|
|
new DialogInterface.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(DialogInterface dialog, int which) { }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Check if the directory exists and whether to overwrite it
|
|
|
|
|
File file = new File(movieDownloadInfo.getAbsoluteFilePath());
|
|
|
|
|
if (file.exists()) {
|
|
|
|
@ -124,7 +118,7 @@ public class MovieInfoFragment extends AbstractInfoFragment
|
|
|
|
|
callbackHandler);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.setNegativeButton(android.R.string.cancel, noopClickListener)
|
|
|
|
|
.setNegativeButton(android.R.string.cancel, (dialog, which) -> dialog.cancel())
|
|
|
|
|
.show();
|
|
|
|
|
} else {
|
|
|
|
|
// Confirm that the user really wants to download the file
|
|
|
|
@ -140,7 +134,8 @@ public class MovieInfoFragment extends AbstractInfoFragment
|
|
|
|
|
callbackHandler);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.setNegativeButton(android.R.string.cancel, noopClickListener)
|
|
|
|
|
.setNegativeButton(android.R.string.cancel, (dialog, which) -> dialog.cancel())
|
|
|
|
|
.setOnCancelListener(dialog -> setDownloadButtonState(false))
|
|
|
|
|
.show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|