misc fixes

* add null checks before resuming a download
* (MissionAdapter.java) reset percent after resuming a download. prevents the "Error" string get stuck, until the download start
This commit is contained in:
kapodamy 2019-01-15 14:58:56 -03:00
parent f2f4e27772
commit 0f9fdb5401
2 changed files with 4 additions and 2 deletions

View file

@ -447,6 +447,7 @@ public class MissionAdapter extends Adapter<ViewHolder> {
if (mission != null) {
switch (id) {
case R.id.start:
h.status.setText(UNDEFINED_SPEED);
h.state = -1;
h.size.setText(Utility.formatBytes(mission.getLength()));
mDownloadManager.resumeMission(mission);