Allow to delete updates currently in download

This commit is contained in:
Gabriele M
2017-07-21 23:23:49 +02:00
parent 8768daddf0
commit 758521bb53
@@ -128,6 +128,7 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter.
final String downloadId = update.getDownloadId();
if (mUpdaterController.isDownloading(downloadId)) {
canDelete = true;
String downloaded = StringGenerator.bytesToMegabytes(mActivity,
update.getFile().length());
String total = Formatter.formatShortFileSize(mActivity, update.getFileSize());
@@ -350,6 +351,7 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter.
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
mUpdaterController.pauseDownload(downloadId);
mUpdaterController.deleteUpdate(downloadId);
}
})